![]() |
What the heck is up with BINARY file i/o? - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html) +--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html) +--- Thread: What the heck is up with BINARY file i/o? (/thread-9957.html) |
What the heck is up with BINARY file i/o? - Zack - 04-12-2007 I want to make a program, very basic, that will XOR the first byte in a file with a code, and replace that byte with the new character. Code: dim as string infile What the heck is up with BINARY file i/o? - DrV - 04-12-2007 The expression 'temp xor code' that you are using in the PUT statement is evaluated in a full 32-bit integer. Cast to a UByte or do it in a temporary variable to get the right results. What the heck is up with BINARY file i/o? - Zack - 04-12-2007 Thanks, it works. Funny, I tried that with the c=... line, but I forgot to use c instead in the PUT statement. |