$66.29 $45.83 $32.86 $53.33 . 91 $ 7 . 79 $97.51 $27.03 $15.28 $49.95 $6.62 $4.58 s 3. 28 $5.33 $7.49 $.77 $9.75 $2.70 $1. 52 $4.99 6629 4 58 3 s 3286 5333 7491 779 s 9751 2703 1528 4995 Mixed Format Field Types Shown below are an integer with leading zeroes, alpha field, floating dollars, and integer with zero suppressed. In line 120, CHR$(29), (skip) is used as a terminator for the alpha field so that it is formatted correctly.
00002 PET COMPUTER $795.00 50 10 OPEN 1,4 20 OPEN 2,4,1 30 OPEN 3,4,2 40 OPEN 4,4,4 50 PRINT#4 :REM ENABLE ERROR DIAGNOSTICS 60 = "ZZZZZ 70 PRINT #3 ,F$ 80 A=2 AAAA 90 = "PET COMPUTER" 100 C= 795 110 D= 50 120 PRINT #2,A,B$,CHR$(29),C,D 130 CLOSE l:CLOSE 2:CLOSE 3:CLOSE 4 Formatting with Literals In the example below, literal characters within a format line are ere· ated by preceding each literal character with the reverse on symbol. 10 OPEN 1,4 20 OPEN 2,4 , 2 30 OPEN 3,4,1 40 F$="1m18llmlii!l* ZZ lml8t mll81 zz . 999 lml& +" 50 PRINT#2,FS 60 FOR I=l TO lO:X=lO*RND(l) :Y=lOOO*RND(l) :Z=8*RND(l) 70 PRINT#3,X;Y;Z:NEXT 80 CLOSEl:CLOSE2:CLOSE3 C-5