4 ms·
Reminds me of trick from the Commodore BASIC days, where you could use "?" as a replacement for "PRINT" to save a whopping 4 bytes. Seems silly now, but back th
by Sodaware 13y ago
Reminds me of trick from the Commodore BASIC days, where you could use "?" as a replacement for "PRINT" to save a whopping 4 bytes. Seems silly now, but back then it made all the difference.
- Doctor_Fegg 13y agoDon't know about Commodore BASIC, but in Locomotive BASIC on the Amstrad CPC, "?" was just a text-entry convenience rather than a memory-saver. BASIC was stored tokenised, so "?" was one byte same as "PRINT" (in fact, I think it was the same byte).
- vidarh 13y agoYes, it's that way on C64 too - it didn't save any space. People certainly did do a lot to save space through omitting spaces, using ";" to separate statements instead of new lines etc.
- ssdsa 13y agoIn Commodore BASIC you use ":" to separate statements. ";" is used at the end of a PRINT statement to keep it from appending a newline.
- mattl 13y agoRecognize your name from the old AA days :)
- LionRoar 13y agoYou are correct. In fact, Commodore Basic had more of these shortcuts which allowed you to type in Basic commands really quickly. If you LISTed the code all shortcuts were changed to their correct command names. Kind of stenographic coding. Never saw anything like that later on with the 'modern' programming languages.. Maybe someone should bring this approach back :) Edit: found a list of the keyword abbreviations. More then I expected/remembered. http://www.c64-wiki.com/index.php/BASIC_keyword_abbreviation http://www.c64-wiki.com/index.php/BASIC_keyword_abbreviation
- rbanffy 13y ago> Never saw anything like that later on with the 'modern' programming languages.. You can always use Emacs and YASnippet. Also, Eclipse has a good couple of extremely handy word expansions.
- ssdsa 13y agoIn Commodore BASIC, the PRINT command is tokenized and stored as a single byte $99 - see this wiki: http://www.c64-wiki.com/index.php?title=BASIC_token http://www.c64-wiki.com/index.php?title=BASIC_token When you use "?", this gets stored as the same token $99 as well. When you LIST the program then, you see PRINT.
- Sodaware 13y agoI did not know that. You learn something new every day!