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.

$CHARREAD "Input a number 1-3: ",xSET multi=$CASE(x,1:"single",2:"double",3:"triple",:"input error")WRITE multiThe following example tests whether the character input is a letter or some other character:READ "Input a letter: ",xSET chartype=$CASE(x?1A,1:"letter",:"other")WRITE chartypeSee Also• DO command• GOTO command• IF command• $SELECT function$CHARConverts the integer value of an expression to the corresponding ASCII or Unicode character.$CHAR(expression,...)$C(expression,...)ParameterexpressionThe integer value to be converted.Description$CHAR returns the character that corresponds to the integer value specified by expression.This character can be an 8-bit (ASCII) character, or a 16-bit (Unicode) character. For 8-bitcharacters, the value in expression must evaluate to a positive integer in the range 0 to 255.For 16-bit characters, specify integers in the range 256 through 65534.You can specify expression as a comma-separated list, in which case $CHAR returns thecorresponding character for each expression in the list.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 193

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

Saved successfully!

Ooh no, something went wrong!