PS TEXT FORMAT Reference Manual
Expressions
5-24 11387 Tandem Computers Incorporated
NUMERIC Function The NUMERIC function returns a number that it obtains from the first
argument.
NUMERIC ( 
exp
 [ ,
i-exp
 ] )
If 
exp
 is a numeric expression, NUMERIC simply returns that same value.
If 
exp
 is a string, and if it has one or more leading characters that are digits
(“0” through “9”) or “numeric punctuation” (leading + or – sign, decimal
point), NUMERIC converts as much of the string as meets that criterion
into a numeric value (for example, “–127.39K” becomes –127.39). If 
exp
 is
a string that has no leading numeric characters, NUMERIC returns zero.
If you include the second argument, which must be an integer, NUMERIC
rounds the returned value to 
i-exp
 decimal places. If you specify zero for
i-exp
, NUMERIC rounds the result to an integer. (N)
ORD Function The ORD function returns a number that represents the position number in
the ASCII collating sequence of the first character of 
exp
, if 
exp
 is a string.
ORD ( 
exp
 )
For example, ORD(“DECAY”) returns 68, the ASCII ordinal position of the
letter D.
If 
exp
 represents a numeric value, ORD returns a value that is equal to 
exp
modulo 256. For example, ORD(2049) returns the value 1.
The ORD function is the complement of the CHR function:
CHR(ORD(“X”)) returns “X”; ORD(CHR(72)) returns 72. (N)










