Functions allowing extra arguments
Root / SmileBASIC Bug Reports / [.]
12Me21Created:
This also means that there are a few more "ignore" functions:
X=POP(A) 'fastest (only works with one type) PCMSTOP POP(A) 'requires DLC IF POP(A) THEN ENDIF 'only works with integers and strings WAIT 0,POP(A) PLEASE POP(A) 'slowest(Obviously you shouldn't actually use those since this is a bug that might be fixed) And a function that returns null:
PCMSTOP()
"Uninitialized variable used" is the error you get when trying to assign null to a variable.
X= isn't a syntax error, it's actually X=(null). When SB expects a value but gets nothing, you get null. That's how functions with "empty" arguments work. LOCATE X, is just LOCATE X,(null), or LOCATE X,PCMSTOP()
("null" isn't an official name, it's just what we've been calling it)
X=PCMSTOP is just treating PCMSTOP as a variable (variables and functions in SB can have the same names, and whether something is a variable or a function depends on context)
Any function can be called as FUNCTION args OUT outputs, even if there are 0 outputs.
For some reason DEF doesn't let you do that, though.