[↑]
SmileBASIC4 Replica Reference
About
1. Using DEF, you can define your own commands like the below

About DEF User-Defined Commands

1) USER (no argument, no return value)
2) USER X,Y (with arguments, no return value)
3) A=USER(X) (with arguments, 1 return value)
4) USER X OUT A,B (with arguments, multiple return values)

DEF Common Rules

・The definition range is from DEF to END.
・Defined variables and labels in the DEF to END range cannot be used from outside the DEF (local variables).
・GOTO and GOSUB across the DEF to END range are not possible.
・By adding COMMON, you can define commands that can be used from outside the defined program slot.

2. A keyword used to define a user-defined command/function beyond the program slot

About COMMON

・When using a program between different program slots, execute it with EXEC first.

1) COMMON DEF USER
2) COMMON DEF USER(X)
3) COMMON DEF USER X OUT A,B

Example

COMMON DEF FOO(X,Y,Z)

Example

A$="12345" 
A$[3] → "4" 
A$[3]="ABC" → "123ABC5" 
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
|