Hi
I am wondering whether the Asc() should have another parameter to force it to return ASCII when the program is compiled in Unicode. The reason is that I have a unicode executable that communicates with devices that send back ASCII text. I put the text into a memory buffer as ASCII but if I use the ASC() on that data the result is a Unicode value. I was naively expecting that it would return the ASCII value. I had to change my code to use PeekA() to get the expected result.
I guess I am wondering how best to handle ASCII text in a unicode executable.
Simon
ASC() Function in Unicode Executable
ASC() Function in Unicode Executable
Simon White
dCipher Computing
dCipher Computing
Re: ASC() Function in Unicode Executable
Send ascii text with:
*txt = Ascii(myPB$)
Read ascii text from outside with:
MyPB$ = PeekS(*txt, -1, #PB_Ascii)
*txt = Ascii(myPB$)
Read ascii text from outside with:
MyPB$ = PeekS(*txt, -1, #PB_Ascii)
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: ASC() Function in Unicode Executable
I guess I better upgrade my version of PB because I do not have that function.
Thanks,
Simon
Thanks,
Simon
Simon White
dCipher Computing
dCipher Computing