The following SAS program is submitted:
data work.flight;
destination='CPG';
select(destination);
when('LHR')city='London';
when('CPH')city='Copenhgen';
otherwise;
end;
run;
Which one of the following is the value of the city variable?
A. London
B. Copenh
C. Copenhgen
D.''(missing character value)
答案是B
我以为是C,因为destination的值是CPG,所以city第一个遇到的值应该是copenhgen,
那city的长度不应该就是copenhgen的长度么?为什么答案是B呢?
题目也没说之前是不是有observation的destination是LHR啊。。。。
谢谢各位!