Spaces in variable names

The place for codemasters or beginners to talk about programming any language for the Spectrum.
equinox
Dynamite Dan
Posts: 1052
Joined: Mon Oct 08, 2018 1:57 am
Location: SE England

Re: Spaces in variable names

Post by equinox »

Sokurah wrote: Wed Jan 03, 2024 11:00 pm I wonder what happens if you do this;
10 LET pig = 10
20 LET dog = 20
30 PRINT pigdog
(easy to test, but I can't be bothered, lol)
Sticking separate names together has to fail because of the logical consequences otherwise: LET pi=3.14: LET g=9: LET pig=100: REM oops, we just wiped two variables.

...although your sixth-form maths teacher who wanted to encourage you to write ab instead of a×b might be sad.
Post Reply