jpospTynker 2025-07-17 13:01
i know timo doesn’t have time on his hands, but i just wanted to tell him to add when he has the chance:
ANIM
CLOSE
DECLARE
DEF
FLASH
FN
FUNCTION
LBOUND
OPEN
OUTPUT
SHARED
STATIC
TEMPO
VOICE
WRITE
These are from the “Reserved Keywords” category in the manual, And.. it’s been 4 years and none of them have actually been used in Lowres NX.
Timo 2025-07-17 15:00
Nice try, I would rather remove them from the reserved keywords ;)
Some of them are from old BASIC dialects and I thought they might be interesting at some point.
Others are for feature ideas I had, but they are actually quite complex.
In the end I think nobody really misses any of these things... We won't get more NX fans just because of these ;)
was8bit 2025-07-18 03:57
The ONLY thing that could possibly be added would be the ability to add functions... however i believe that with careful use of SUB and GLOBAL variables you can get the same results
SUB is actually quite powerful and has great flexibility in how you can use them
... also GOSUB can be used by the main code as well as inside a SUB... not originally intented that way but opens up interesting possibilities... it is equivalent of rewriting all the GOSUB code into where the call is made...
was8bit 2025-07-18 03:58
In other words, challenge yourself to see how far you can push the existing code... it is probably more powerful than you realize ;)
Timo 2025-07-18 07:30
You don't need GLOBAL to return values from a SUB:
RESULT=0
CALL DOSOMETHING(RESULT)
PRINT RESULT
SUB DOSOMETHING(R)
R=42
END SUB
wryhode 2025-07-18 13:18 (Edited)
Although it was probably never done in any BASIC variant; one thing I really wish was implemented is storing a reference to a SUB as a variable. (You could implement a kind of switch statement by storing a bunch of SUBs in an array and calling the SUB at the corresponding index, for instance.)
An even bigger change requiring a huge architecture or 'layout' change would be to allow programs to be stored on the disk and ran.
was8bit 2025-07-18 15:52
@Timo...
Absolutely... receiving variables, and then being able to process them and return back a different value, is what makes SUB powerfull...
... but, there are also times when a SUB having access to GLOBAL variables, is helpful... like if you need the SUB to know how many iterations it has been run....
was8bit 2025-07-18 16:01
@wryhode...
A SWITCH that calls different SUBS could tricky, as each SUB may require different variables in different orders, and then how to you account for variables processed inside the SUB being fed back to change the variable values of originally sent variables
A stacked IF THEN list would be the way to do that, allowing each SUB to the code it needs to receive then return variable data in back out
... the other idea kinda strays from the LowResolution concept, where we are programming on an older styled game player ;)
Pablo 2025-07-18 17:55 (Edited)
I missed functions too. I think we can probably craft a preprocessor for that.