I am trying to write a program to convert a raw list of openGL constants in to a library file for bbcsdl/bb4w. The following program successfully converts the text file into a structure(d) list but when i save it to file i can not read it with bb4w. The error "line too long" occurs. Pleasde can someone tell me how to modify line 440 and onwards to solve my problem. Thanks in advance Ric.
Code: Select all
10 DIM const{(2750) name$,value$}
40
50 c% = OPENIN("constants.txt")
60 d% = OPENOUT("myConstants.bbc")
70 f$ = ""
80 g$ = ""
90 l% = 0
100
110 REPEAT
120
130 f$ = ""
140 REPEAT
150 e% = BGET#c%
160 f$+=CHR$(e%)
170 UNTIL e% = 32
180 IF LEN(f$) < 55 THEN f$ += STRING$(55-LEN(f$), " ")
190 REPEAT
200 e% = BGET#c%
210 UNTIL e% = 120
220
230 g$ = ""
240 REPEAT
250 e% = BGET#c%
260 g$ += CHR$(e%)
270 UNTIL e% = 41
280
290 g$ = LEFT$(g$,LEN(g$)-1)
300 g$ = "= &" + g$
310
320 REM PRINT f$,g$
330
340 const{(l%)}.name$ = f$
350 const{(l%)}.value$ = g$
360
370 l% += 1
380 e% = BGET#c%
390
400 UNTIL e% = 46
410
420 PRINT l%
430
440 PTR#d% = 0
450 FOR f% = 0 TO l%
460
470 const{(f%)}.name$ = STR$(f%) + " " + const{(f%)}.name$ + const{(f%)}.value$ + CHR$(13)
480 PRINT#d%, const{(f%)}.name$
500 NEXT
510
520 CLOSE#0