'CONVERT.BAS by J. C. Sprott 'Converts an ASCII data file of n, d, and s to Binary CLS OPEN "infile.dat" FOR INPUT AS #2 OPEN "outfile.dat" FOR BINARY AS #1 SEEK 1,0 WHILE NOT eof(2) INPUT #2, n!,d!,s!,l! PRINT n!,d!,s!,l! ni%=cint(log2(n!)): di%=cint(log2(d!)): si%=cint(log2(s!)) PUT$ #1, chr$(ni%)+chr$(di%)+chr$(si%)+mks$(l!) WEND CLOSE END