Hi,
would it be possible to add a flag to the ReadProgramString() and WriteProgramString() functions to set the format of the strings being read from stdin or written to stdout etc? Much like PeekS(), PokeS() etc.
The reason I ask is that I am writing an app which needs to communicate with the PB compiler and when running in Unicode mode I have to take steps to send all commands in ascii and receive all data in ascii etc. When reading the output from the compiler, I have to use ReadProgramData() when running my app in unicode mode etc. It would be far easier to use ReadProgramString() with a #PB_Ascii flag etc.
(@Freak : I am finding that when using ReadProgramData() to get the compiler's output (STANDBY mode), unless I read one byte at a time, I am finding it difficult to get the compiler to send all the data, it doesn't seem to flush it's 'outbound' pipe until I close the connection with the compiler - something I can't do until the compiler has sent all of it's data! E.g. with a buffer of 1024 bytes, I typically find that 200+ bytes remain to be read - likely held up in a buffer somewhere! I can send you the code if you wish to take a look?)
WriteProgramString(program, FLAG)
WriteProgramString(program, FLAG)
I may look like a mule, but I'm not a complete ass.
-
- Addict
- Posts: 1027
- Joined: Sun May 15, 2005 5:15 am
- Location: Australia
- Contact: