|
Post by charliejv on Feb 4, 2023 20:44:15 GMT -5
The LET statement was implemented such that it could only handle one value-to-variable assignment.
Now, the LET statement allows multiple value-to-variable assignments.
For example:
LET a$ = "howdy", b$ = "there"
Taking advantage of line continuation, and the LET keyword becomes useful as a visual marker indicating the declaration or variables and value assignments:
LET a$ = "howdy", _ b$ = "there"
As was the case before, the LET keyword is optional (when declaring and assigning a value to one, and only one, variable.
|
|
|
Post by charliejv on Feb 4, 2023 23:40:02 GMT -5
Oops, a little bug I need to fix. Stay tuned.
|
|
|
Post by charliejv on Feb 5, 2023 0:29:18 GMT -5
Bug squashed.
|
|
|
Post by charliejv on Feb 5, 2023 21:01:34 GMT -5
And just because that was annoying me too ...
"DIM" has always been to me about declaring an array.
At some point, BASIC implementations started using that for declaring variables.
That has always annoyed me.
So as an alternative to DIM, I've setup the keyword VAR without getting into much fuss: VAR invokes the exact same code as DIM, so VAR can be used to declare arrays too.
The goal for myself is to use VAR for variables (if I'm not using LET), and use DIM for arrays.
Semantically/intuitively, that feels better to me.
|
|