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.

$NORMALIZE parses multiple trailing signs, and $ISVALIDNUM rejects any stringcontaining a trailing sign as an invalid number.• Parentheses: $NUMBER parses parentheses surrounding an unsigned number in a quotedstring as indicating a negative number. $NORMALIZE and $ISVALIDNUM rejectparentheses.• Numeric strings containing multiple decimal characters: $NORMALIZE validatescharacter-by-character until it encounters the second decimal character. For example, inAmerican format it validates “123.4.56” as the number 123.4. $NUMBER and$ISVALIDNUM reject any string containing more than one decimal character as aninvalid number.Numeric strings containing other non-numeric characters: $NORMALIZE validatescharacter-by-character until it encounters an alphabetic character. It validates “123A456”as the number 123. $NUMBER and $ISVALIDNUM validate the entire string, theyreject “123A456” as an invalid number.• The null string: $NORMALIZE parses the null string as zero (0). $NUMBER and$ISVALIDNUM reject the null string.The $ISVALIDNUM and $NUMBER functions provide optional min/max range checking.$ISVALIDNUM, $NORMALIZE, and $NUMBER all provide rounding of decimal numbersto a specified number of decimal digits. $ISVALIDNUM and $NORMALIZE can rounddecimal digits, and round or truncate a decimal number to return an integer. For example,$NORMALIZE can round 488.65 to 488.7 or 489, or truncate it to 488. $NUMBER canround decimal numbers or integers. For example, $NUMBER can round 488.65 to 488.7,489, 490 or 500.See Also• $FNUMBER function• $INUMBER function• $NORMALIZE function• $NUMBER function• More information on locales in Customized National Language Translations$ISVALIDNUM<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 235

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

Saved successfully!

Ooh no, something went wrong!