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.

$INUMBER• No sign or parentheses.• Either a leading or trailing MinusSign, but not both.• Either a leading or trailing PlusSign, but not both.• Leading and trailing parentheses.When a null format is specified, fnumber may optionally have NumericGroupSeparatorsymbols appear anywhere to the left or right of the DecimalSeparator, if any. However, eachNumericGroupSeparator must have at least one digit to its immediate left and one to itsimmediate right. Sign rules are flexible, and leading and trailing blanks and zeros are ignored.Thus, the following two commands:WRITE !,$INUMBER("+1,23,456,7.8,9,100","")WRITE !,$INUMBER("0012,3456,7.891+","")are both valid and return the same number, formatted according to the default locale. However,WRITE $INUMBER("1,23,,345,7.,8,9,","")is invalid because of the adjacent commas, the adjacent period and comma, and the trailingcomma. It generates an error.Behavior Common to All FormatsRegardless of the specified format codes, $INUMBER always ignores leading and trailingblank spaces or zeros, but considers fnumber to be invalid if it has any of the followingcharacteristics:• Both a PlusSign and a MinusSign• More than one PlusSign or MinusSign• Parentheses and a PlusSign• Parentheses and a MinusSign• More than one DecimalSeparator• Embedded Spaces• The $DOUBLE values INF or NAN• Any characters other than the following:- Numeric digits- “(“<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 227

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

Saved successfully!

Ooh no, something went wrong!