Page 1 of 1

[Implemented] Flags for ReadCharacter()

Posted: Fri Apr 27, 2007 3:44 pm
by AND51
Hello!

I need to read 1 letter out of a file. I found no other way, so I request flags for ReadCharacter() by this. My file is always an ASCII file which makes it impossible to compile my program as Unicde at the moment.
If I'm wrong and there IS another way to solve this problem, then don't watch this thread any more and tell me, how to do it.

Greets, AND51

Posted: Fri Apr 27, 2007 4:27 pm
by Kaeru Gaman
if your file is always plain ASCII, use ReadByte instead of ReadChar... ;)

....and wasn't there a way to change it on the fly, to aplly ASCII on ReadChar even if the program in compiled Unicode?

Posted: Fri Apr 27, 2007 4:56 pm
by Demivec
ReadData(FileNumber, *MemoryBuffer, LengthToRead) would also work. Use PeekS(*MemoryBuffer , Length , #PB_Ascii) to access it.

Posted: Fri Apr 27, 2007 6:38 pm
by AND51
Thank you very, very much for your information :!: