data new; x = '1000'; y= x * .10; run; What is the result?
-
y = '100'
-
y = 100 and a NOTE is written in the SAS log saying that character value has been converted to numeric value
-
y = 100 and no NOTE is written in the SAS log
-
Program does not execute due to Syntax Errors
In SAS, when a character value is used in a numeric context (like multiplication), SAS automatically converts it to numeric. The character '1000' becomes 1000, and 1000 * 0.10 = 100. SAS always writes a NOTE to the log when automatic character-to-numeric conversion occurs.
In SAS, when you multiply a character value like '1000' by a number, SAS automatically performs an implicit character-to-numeric conversion so the arithmetic can proceed, resulting in y = 100. Because this conversion happens silently but isn't something the programmer explicitly coded, SAS writes a NOTE to the log warning that a character value was converted to numeric, so the programmer is aware the conversion occurred.