寫入數值,此數值包含前置歐元符號 (E)、隔開每三位數的逗號,以及隔開小數部分的句點。
類別: | 數值 |
對齊: | 右 |
陳述式
|
結果
|
---|---|
|
----+----1----+----2----+----3 |
put amount euro10.2; |
E1,254.71 |
put amount euro5.; |
1,255 |
put amount euro9.2; |
E1,254.71 |
put amount euro15.3; |
E1,254.710 |
data _null_; input x; put x euro10.2; put x euro5.; put x euro9.2; put x euro15.3; datalines; 1254.71 ; run; SAS Log: E1,254.71 1,255 E1,254.71 E1,254.710
/* This code determines the default length. */ data _null_; input x; put x euro.; datalines; 1 22 333 4444 55555 666666 7777777 88888888 999999999 1234561234 ;run; SAS Log: datalines; E1 E22 E333 E4,444 55,555 666666 7.78E6 8.89E7 1E9 1.23E9 NOTE: At least one W.D format was too small for the number to be printed. The decimal may be shifted by the "BEST" format.
/* This code determines the range. */ data _null_; input x; put x euro5.; put x euro6.; put x euro7.; put x euro8.; put x euro9.; put x euro9.2; put x euro10.; put x euro10.2; put x euro10.4; put x euro11.; put x euro11.3; put x euro12.; put x euro12.2; put x euro13.; put x euro13.2; datalines; 333 4444 55555 666666 7777777 88888888 999999999 1234561234 ;run;