11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ExamplesThe following example writes the natural log of the integers 1 through 10:$ZLNFOR x=1:1:10 {WRITE !,"The natural log of ",x," = ",$ZLN(x)}QUITreturns:The natural log of 1 = 0The natural log of 2 = .6931471805599453089The natural log of 3 = 1.098612288668109691The natural log of 4 = 1.386294361119890618The natural log of 5 = 1.609437912434100375The natural log of 6 = 1.791759469228055002The natural log of 7 = 1.945910149055313306The natural log of 8 = 2.079441541679835929The natural log of 9 = 2.197224577336219384The natural log of 10 = 2.302585092994045684The following example shows the relationship between $ZLN and $ZEXP:SET x=$ZEXP(1) ; x = 2.718281828459045236WRITE $ZLN(x)returns 1.WRITE $ZLN(0)generates an error.See Also• $ZEXP function• $ZLOG function• $ZPI special variable<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 369

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!