Практикум преобразований строк в числа
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | * Примеры преобразований строк в числа. * rlevesque@videotron.ca. * Пример 1. DATA LIST FIXED /mydata 1-10 (A). BEGIN DATA 6,188 400 12,125.25 END DATA. LIST. COMPUTE nb=NUMBER(mydata,COMMA10). LIST. * Пример 2. DATA LIST FIXED /mydata 1-10 (A). BEGIN DATA 6188 400 12125.25 END DATA. LIST. COMPUTE nb=NUMBER(mydata,F10). LIST. * Пример 3. DATA LIST FIXED /mydata 1-10 (A). BEGIN DATA 6.188 400 12.125,25 END DATA. LIST. COMPUTE nb=NUMBER(mydata,DOT10). LIST. * Пример 4. DATA LIST FIXED /mydata 1-10 (A). BEGIN DATA $6,188 $400 $12,125.25 END DATA. LIST. COMPUTE nb=NUMBER(mydata,DOLLAR10). LIST. * Пример 5. DATA LIST FIXED /mydata 1-10 (A). BEGIN DATA 6.188% 400% 12.12525% END DATA. LIST. COMPUTE nb=NUMBER(mydata,PCT10). LIST. FORMATS nb(PCT10.5). LIST. |
Related pages
...