J******d 发帖数: 287 | 1 The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country = City!!', '!!'England';
run;
Which one of the following is the value of the variable CITY_COUNTRY in the
output data set?
A. Ipswich!!
B. Ipswich, England
C. Ipswich, 'England'
D. Ipswich , England
Answer: D
为什么不是B? | i******n 发帖数: 839 | 2 I guess, reason is that default length of a categorical Variable is 8. | S******y 发帖数: 1123 | 3 length 16
trailing blanks | w*******t 发帖数: 928 | 4 The length of variable City is not defined. So, its length will be decided
by the length of variable First.
The answer should be "Ipswich_________, England'.
the
【在 J******d 的大作中提到】 : The following SAS program is submitted: : data work.test; : First = 'Ipswich, England'; : City = substr(First,1,7); : City_Country = City!!', '!!'England'; : run; : Which one of the following is the value of the variable CITY_COUNTRY in the : output data set? : A. Ipswich!! : B. Ipswich, England
| J******d 发帖数: 287 | 5 谢谢!
the
【在 J******d 的大作中提到】 : The following SAS program is submitted: : data work.test; : First = 'Ipswich, England'; : City = substr(First,1,7); : City_Country = City!!', '!!'England'; : run; : Which one of the following is the value of the variable CITY_COUNTRY in the : output data set? : A. Ipswich!! : B. Ipswich, England
|
|