Quote:
> Is there a QB Style basic out there which supports long filenames and can
> compiled .exe's which can run without the need for libraries'
> This is the sort of thing that I'm used to writing for QB......
> OPEN BackupFile$ FOR INPUT AS #3
> OPEN TextFile$ FOR OUTPUT AS #4
> DO
> LINE INPUT #3, DataLine$
> IF (DataLine$ = FirstLine$) AND (Flag% = 0) THEN
> PRINT #6, " - found data, deleting!"
> FOR Skip% = 1 TO NumLine%
> LINE INPUT #3, DataLine$
> NEXT Skip%
> Flag% = 1
> END IF
> PRINT #4, DataLine$
> LOOP UNTIL EOF(3)
> IF Flag% = 0 THEN PRINT #6, " - data not found!"
> CLOSE #4
> CLOSE #3
> I don't have an American recognised credit card so I don't have the option
> of buying Powerbasic CC/DLL (as if I could afford on my meagre wage)
Here is your programme translated into XBasic :
' OPEN BackupFile$ FOR INPUT AS #3
backup = OPEN(BackupFile$ , $$RD)
' OPEN TextFile$ FOR OUTPUT AS #4
textfile = OPEN(TextFile$ , $$WR)
'DO
DO
' LINE INPUT #3, DataLine$
DataLine$ = Infile$(backup)
' IF (DataLine$ = FirstLine$) AND (Flag% = 0) THEN
IF (DataLine$ = FirstLine$) AND (Flag% = 0) THEN
' PRINT #6, " - found data, deleting!"
PRINT " - found data, deleting!"
' FOR Skip% = 1 TO NumLine%
FOR Skip% = 1 TO NumLine%
' LINE INPUT #3, DataLine$
DataLine$ = Infile$(backup)
' NEXT Skip%
NEXT Skip%
' Flag% = 1
Flag% = 1
' END IF
END IF
' PRINT #4 , DataLine$
PRINT [textfile] , DataLine$
' LOOP UNTIL EOF(3)
LOOP UNTIL EOF(backup)
'IF Flag% = 0 THEN PRINT #6, " - data not found!"
IF Flag% = 0 THEN PRINT " - data not found!"
'CLOSE #4
CLOSE(textfile)
'CLOSE #3
CLOSE(backup)
Vic