Reads numeric data in the specified locale for local expressions,
and then converts the data to a numeric value.
-
w
-
specifies the width of the input field.
-
d
-
optionally specifies whether to divide
the number by 10d. If the data contains
decimal separators, the d value is ignored.
The NLNUMw.d) informat reads numeric data in the specified locale for
local expressions, and then converts the data to a numeric value. It removes
any thousands separators, decimal separators, blanks, the currency symbol,
and the close parenthesis from the input data.
The NLNUMw.d informat performs processing that is opposite to the
NLNUMIw.d informat.
The following example uses -1234356.78 as the input
value.
Statements |
Results |
|
----+----1----+
|
options locale=English_UnitedStates;
x=input('-1,234,356.78',nlnum32.2);
put x=;
|
-1234356.78
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.