QB64 Phoenix Edition
Alchemy - A word Game - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7)
+---- Thread: Alchemy - A word Game (/showthread.php?tid=361)

Pages: 1 2 3 4


RE: Alchemy - A word Game - PhilOfPerth - 05-11-2022

@bplus: I fiddled around with the snippet, and eventually got it to compile ok with this code:
Code: (Select All)
For a = 1 To 26
    filename$ = Chr$(a + 64)
    newfile$ = Chr$(a + 64) + "new"
    Open filename$ For Input As #1
    Open newfile$ For Output As #2
    While Not EOF(1)
        Input #1, fline$
        If _Trim$(fline$) <> "" Then
            Print #2, fline$
        Else
            deletedlines = deletedlines + 1
            Print filename$; deletedlines; "  ";
        End If
    Wend
    Close
Next
Close
and the lines were removed! Great stuff; thanks. Not sure what was different, but the method you gave worked really well.
I found in the meantime that the Z file was not there (on my copy) so I downloaded that and treated it as well. I'll upload the reduced files in a few minutes.
(yes, I remembered to change the filenames back to just one char).