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.

<strong>Caché</strong> <strong>ObjectScript</strong> Functions123+123–SET A=123SET B=-123SET x=$FNUMBER(A,"T+")SET y=$FNUMBER(B,"T")SET z=$FNUMBER(A,"T")WRITE !,x,!,yWRITE !,z,"space after var z"123 space after var zThe following example returns (30.567); $FNUMBER places the value of B in parenthesesand removes the minus sign.SET B=-30.567WRITE $FNUMBER(B,"P")NotesDecimal Delimiter$FNUMBER will use the value of the DecimalSeparator property of the current locale asthe delimiter between the whole part and fractional part of a number (unless the “.” formatcode is used). The default value of DecimalSeparator is “.” and all documentation uses thisdelimiter.See Also• $JUSTIFY function• $INUMBER function• $ISVALIDNUM function• $NORMALIZE function• $NUMBER function• More information on locales in Customized National Language Translations216 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!