I have compiled the code below into STDINTEST.EXE, and when I try to Pipe anything through it, it just siezes up.
The command that is actually causing the problem is ReadStdin(), I thought initially I was going into an endless loop during While...Wend, but this is not the case.
Any idea where I am going wrong?
Test it from a command line like this:
C:\Blitz\stdin> Echo Hello | stdintest.exe
*****
WARNING: This code will hang.
Run it in a command window, and you may need to terminate the process manually.
*****
Framework BRL.StandardIO
Print "POS=" + StandardIOStream.Pos()
Print "IO=" + StandardIOStream.Size()
Print "EOF=" + Eof(StandardIOStream)
While Not Eof(StandardIOStream)
' THIS LINE CAUSES THE APP TO HANG
Print "=='" + ReadStdin() + "'=="
Wend
Print "STDIN done"
The command that is actually causing the problem is ReadStdin(), I thought initially I was going into an endless loop during While...Wend, but this is not the case.
Any idea where I am going wrong?
Test it from a command line like this:
C:\Blitz\stdin> Echo Hello | stdintest.exe
*****
WARNING: This code will hang.
Run it in a command window, and you may need to terminate the process manually.
*****
Framework BRL.StandardIO
Print "POS=" + StandardIOStream.Pos()
Print "IO=" + StandardIOStream.Size()
Print "EOF=" + Eof(StandardIOStream)
While Not Eof(StandardIOStream)
' THIS LINE CAUSES THE APP TO HANG
Print "=='" + ReadStdin() + "'=="
Wend
Print "STDIN done"