r/qbasic • u/Bitter-Evening927 • 15d ago
can anybody explain this?
is this an undocumented function in QB4.5? i can't find an explanation of what's going on here. i found this little snippet of code on an archive of shareware software from 1990.
13
Upvotes


8
u/DerekRss 15d ago
Sure! It's code to emcrypt or decrypt a piece of text that it asks you for. It works by calling a TextEncrypt$ function and a TextDecrypt$ function, both of which are user-defined functions which you have not shown. To see them press the F2 key or use the drop-down menu option.
2
u/aieidotch 15d ago
must be a bug, share the source. the function code is missing on your post
1
u/shh_coffee QB 4.5 15d ago edited 15d ago
The TextEncrypt$ and TextDecrypt$ are probably doing a simple ROT type of encryption. As another user said, they're user defined functions you can access by pressing F2 to see what they're doing.
I wrote a simple ROT13 encrypt/decrypt QB program example a few years ago that's probably similar in how it works: https://petesqbsite.com/phpBB3/viewtopic.php?p=39064#p39064
1
u/thondat 15d ago
Subs and functions are edited separately from the module top-level in the QBasic/QuickBASIC editor. Pressing F2 opens a list of subs/functions where you can select one to enter (or select the top-level to go back there).