3 ms·
I remember having integer variables in Amstrad CPC (Locomotive) Basic. Something with the % symbol. edit: ChatGPT says that BBC BASIC and TRS-80 Microsoft BASIC
by nopakos 2y ago
I remember having integer variables in Amstrad CPC (Locomotive) Basic. Something with the % symbol.
edit: ChatGPT says that BBC BASIC and TRS-80 Microsoft BASIC also supported integer variables with % declaration.
- canucker2016 2y agoThe wikipedia page for Microsoft BASIC (which Applesoft Basic is a variant), https://en.wikipedia.org/wiki/Microsoft_BASIC https://en.wikipedia.org/wiki/Microsoft_BASIC, mentions that integer variables were stored as 2 bytes (signed 16-bit) but all calculations were still done in floating point (plus you needed to store the % character to denote an integer var). So the main benefit was for saving space with an array of integers.
- sedatk 2y agoYes, Locomotive BASIC also supported DEFINT command, so, all variables in a given range would be treated as integers without "%" suffix.