Also (that was I btw, I thought I was logged in), arrays are not dynamic so I can't just dim an array and then push more values. Correct?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2021-12-17
DIM also redimensions, a la C's realloc() or MS BASIC'S REDIM PRESERVE.
Use LOCAL to declare an array within a function or procedure.
I don't think X11 Basic was designed to be a "functional" language like LISP or LOGO. You might be able to get close by abusing strings or creating your own list arena in a global dynamic array, kind of like how 1983 Atari LOGO did its memory management.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, you can at least put the array as "by reference" in the parameter list. (See the VAR statement). This way your subroutine can modify the array content.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What the topic says. If that's true and I am not missing something, all arrays need to be global.
Also (that was I btw, I thought I was logged in), arrays are not dynamic so I can't just dim an array and then push more values. Correct?
DIM also redimensions, a la C's realloc() or MS BASIC'S REDIM PRESERVE.
Use LOCAL to declare an array within a function or procedure.
I don't think X11 Basic was designed to be a "functional" language like LISP or LOGO. You might be able to get close by abusing strings or creating your own list arena in a global dynamic array, kind of like how 1983 Atari LOGO did its memory management.
Well, you can at least put the array as "by reference" in the parameter list. (See the VAR statement). This way your subroutine can modify the array content.