I am having a problem in MS Windows, though not in Linux, in using PRINT #. Here is the test program I'm using to try to understand what is happening:
Code: Select all
Dim As String lines(1 To 20)
Open cons For Input As #1
For i As Integer = 1 To 20 ' deleted next useless line
Line Input #1, lines(i)
Open cons For Output As #2
For i As Integer = 1 To 20
Print #2, lines(i)
I have a compiled version of the above code processing a chunk of FB code in a file called testme,bas. I am reading 20 lines from that file and outputting (without change) to results.bas. The command-line is: testprintnum <testme.bas> results.bas. But results.bas always has an extra blank line for each line inputted and outputted. And the hex data at each line end is 0D0D0A rather than what it should be.
Any help would be good -- either to verify you get the same result, or better, can explain what is happening. Especially if there is some fix for this.