[↑]
SmileBASIC4 Replica Reference
CALL
1. Call a user-defined command with a specified name

CALL CommandName[,Parameter...][ OUT Variable1[,Variable2...]]

Parameters

CommandName

・A string of the user-defined command name to be called.
・Program slot specification is possible in the format of "1:User-DefinedCommandName".
・Make the program in the target slot executable with the EXEC command in advance.

Parameter ~

Parameters required for the specified commands

Return Value

Describe as many variable names as you want to return as a result after OUT

Example

CALL "USERCD",X,Y OUT A,B
'
DEF USERCD X,Y OUT A,B
A=X+Y:B=X*Y
END
2. Call function with specified name

CALL(FunctionName[,Parameter...])

・Both built-in functions and user-defined functions can be specified.

Parameters

FunctionName

・A string of the user-defined function name to be called.
・Program slot specification is possible in the format of "1:User-DefinedFunctionName".
・Make the program in the target slot executable with the EXEC command in advance.

Parameter

Enumerate parameters required for specified function

Return Value

The value returned by the specified function

Example

A=CALL("USERFC",X,Y)
'
DEF USERFC(X,Y)
RETURN X*Y
END
3. Call callback

CALL SPRITE
CALL TEXT

・Calls the specified callback operation by SPFUNC and TFUNC all at once.
・Specified callback with SPFUNC is called with CALL SPRITE.
・Specified callback with TFUNC is called with CALL TEXT.
・The sprite management number and text screen ID related to the called callback can be obtained with CALLIDX().

Example

CALL SPRITE
CALL TEXT
About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|