3 ms·
Back in the late nineties I worked with a software called Origin. It had a BASIC like programming language where variable names consisted of single letters. If
by weinzierl 6y ago
Back in the late nineties I worked with a software called Origin. It had a BASIC like programming language where variable names consisted of single letters. If you now think 26 variable names should be enough: Some of the letters, like X and Y, had special predefined meaning and you couldn't change that. If you used seem you encountered strange behaviour, like values changing behind your back. To add insult to injury I could never find documentation about which variables were special, so I stuck with the few I new were safe, which were not many...
- dhosek 6y agoThere was a basic programming cartridge for the Atari 2600. It was limited to programs that could fit on a single low-res screen (I think six lines?) and only allowed one or two variables, if I recall correctly. I remember trying to write a simple program on a friend's Atari and found something that seemed really fundamental (maybe altering the value of an index variable in a for loop) was not allowed.
- stOneskull 6y agoseems like it was made just so users could do a 10 print 'i am the best!'; goto 10 on their tv like their computer user friends could
- Starwatcher2001 6y agoThe old TRS-80 Model 1, Level 1 had 4KB of memory and the only permitted variables were integers (A-Z), and two strings A$ and B$. No decimals, floats etc. Level 2 allowed any number of letters in a variable name... but only the first two were recognised as unique. CUSTORDER was seen as the same variable as CUSTLINE.
- makeset 6y ago> allowed any number of letters in a variable name... but only the first two were recognised as unique. That was a well-known Microsoft BASIC feature that got passed down licensed descendants like TRS-80 and Commodore BASIC, and lasted through earlier 6502 BASIC implementations.
- codeulike 6y agoLike registers in a processor. e.g. the ARM1 had 16 32-bit registers, some of which were special (e.g. one was the pointer to the next instruction). From the point of view of a running program, those registers are the only true 'variables' that the processor had. Everything else was achieved by swapping them in and out of memory. I guess its the same for all processors. So a language with a restricted number of variables is actually pretty realistic - it represents the bare metal quite well.