#2✎ 169012Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfThis 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()
Posted 3 months ago
Edited 3 months ago
by 12Me21

#3✎ 198MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthDrawingI like to draw!HobbiesReadingI like to read books!HobbiesDIM X
X=PCMSTOP
> OKDIM X
X=PCMSTOP()
> Uninitialized variable used in 0:2
Posted 3 months ago

#4✎ 597IAmRalseiForum LeaderHiddenAchievementsFirst YearMy account is over 1 year oldWebsiteExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming Strength

I don't think this has anything to do with this thread but okay
Posted 3 months ago

#5✎ 198MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthDrawingI like to draw!HobbiesReadingI like to read books!HobbiesWell, it's an odd behavior.
Edit: also, not sure if any other function can do this, but
PCMCONT OUT
PCMCONT 0 OUT
> OKOUT with no outputs normally gives an error.
Also, during my testing of this:
DEF T OUT
END
> Out of code memory in 0:1
Haven't seen that one before.
Posted 3 months ago
Edited 3 months ago
by MZ952

#6✎ 169012Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express Yourself"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.
Posted 3 months ago
Edited 3 months ago
by 12Me21

#7✎ 198MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthDrawingI like to draw!HobbiesReadingI like to read books!HobbiesSomewhat news to me, do we have a page on it? (Edit: on the any Function arg Out opts)
Also, looks like you just can't define a function like that.
DEF T END
T OUT
> OK
Ah, looks like I'm redundant here sadface
Posted 3 months ago
Edited 3 months ago
by MZ952