Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Variable Names
#8
To be able to use a variable name like "1a" we would all have to use "LET" again. Obligatorily.

It's simply because the earliest versions of BASIC supported line numbers! Yes remember that? Couldn't have a program in GW-BASIC for example without line numbers. And in an 8-bit computer like my Radio Shack TRS-80 Color Computer 2, "1a=3" would be broken down to:

Code: (Select All)
1 a = 3

The earliest BASIC's on 8-bit computers allowed almost all spaces omitted when composing programs because a space actually took up room in memory, and back then those computers had to work with 16KB or less RAM.

Oh well C and Lua and many other programming languages also don't permit numerals to begin a variable name, for other reasons.

Dimster why do you want to have a variable like "1a" anyway?
Reply


Messages In This Thread
Variable Names - by Dimster - 11-19-2023, 06:18 PM
RE: Variable Names - by RhoSigma - 11-19-2023, 06:46 PM
RE: Variable Names - by CharlieJV - 11-19-2023, 07:46 PM
RE: Variable Names - by James D Jarvis - 11-19-2023, 07:52 PM
RE: Variable Names - by Haggarman - 11-19-2023, 07:58 PM
RE: Variable Names - by SMcNeill - 11-19-2023, 08:12 PM
RE: Variable Names - by bplus - 11-19-2023, 08:23 PM
RE: Variable Names - by mnrvovrfc - 11-19-2023, 09:01 PM
RE: Variable Names - by Jack - 11-19-2023, 10:43 PM
RE: Variable Names - by DSMan195276 - 11-19-2023, 11:01 PM
RE: Variable Names - by Dimster - 11-20-2023, 01:46 PM
RE: Variable Names - by mnrvovrfc - 11-22-2023, 01:46 AM
RE: Variable Names - by Jack - 11-22-2023, 10:17 AM
RE: Variable Names - by mnrvovrfc - 11-22-2023, 09:47 PM



Users browsing this thread: 3 Guest(s)