Here's a quirk of Commodore BASIC for you:
Firstly, type your string as you usually would, then go to the line with your string in and at the end at the last character of it, press SHIFT+INS/DEL for as many characters as you have (in the example, 13). Now press the INS/DEL key up to the closing quotation mark. A reversed T should fill the string to the closing quotation mark.
Printing the string will not show anything (and in the listing it looks like an empty string), but printing it to the length of the original message using the LEFT$ command will show it.
This was a nice trick when I wanted to hide my passwords when I was 10 or 11
Regards,
Shaun.
Hiding messages in strings.
Hiding messages in strings.
BASIC Programming - making the mistakes so that you don't have to.
Circles and Squares.
Nothing I post here will stand up in a court of law.
Circles and Squares.
Nothing I post here will stand up in a court of law.
Re: Hiding messages in strings.
I used to do that as well.
Here's another way to do it: In line 10 after the 'REM' type 2 double quotes, delete the second, to exit quote mode.
Press CTRL+9, to enter reverse mode.
Press 'T' for every character back to, the 'H" (in this case 18 times).
Press CTRL+0 to exit reverse mode.
Finally, type a double quote and press RETURN.
It's a few more steps, but you don't need the LEFT$ function any more.
Here's another way to do it: In line 10 after the 'REM' type 2 double quotes, delete the second, to exit quote mode.
Press CTRL+9, to enter reverse mode.
Press 'T' for every character back to, the 'H" (in this case 18 times).
Press CTRL+0 to exit reverse mode.
Finally, type a double quote and press RETURN.
It's a few more steps, but you don't need the LEFT$ function any more.
Ray...
It's Ok if you don't agree with me, I can't force you to be right.
It's Ok if you don't agree with me, I can't force you to be right.
Who is online
Users browsing this forum: No registered users and 11 guests