Sunday, December 12, 2010

Variable Name and Variable Value

The SAS programming language uses matched pairs of either double or single quotation marks to distinguish character constants from names. The quotation marks are not stored as part of the token that they define. For example, in the following program, var is stored as a four-byte variable that has the value text. If text were not enclosed in quotation marks, it would be treated as a variable name. var2 is stored as a seven-byte variable that has the value example.
    data one;
var='text';
text='example';
var2=text;
run;

No comments:

Post a Comment