Language Reference |
produces a numeric representation of a character matrix
where matrix is a character matrix or a quoted literal.
The NUM function takes as an argument a character matrix with elements that are character numerics; and produces a numeric matrix with dimensions that are the same as the dimensions of the argument and with elements that are the numeric representations (double-precision floating-point) of the corresponding elements of the argument.
An example that uses the NUM function follows:
c={'1' '2' '3'}; j=num(c); C 1 row 3 cols (character, size 1) 1 2 3 J 1 row 3 cols (numeric) 1 2 3See also the description of the CHAR function, which does the reverse conversion.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.