[↑]
SmileBASIC4 Replica Reference
ENUM
Define constants with sequential numbers

ENUM #ConstantName[=ConstantExpression][,#ConstantName[=ConstantExpression]]

・Unlike CONST, only Int constants can be defined.
・Constant expressions can be omitted.
・If not specified, the set value +1 in the previous constant definition is used.

ConstantName

・Constant names have the same format as variable names and begins with '#'.

ConstantExpression

・Int, other Int constants, RGB, RGBF, HSV, HSVF, DEG, RAD, and their operations can be used for constant expressions.
・If the constant expression is a Real, the decimal part is rounded toward zero.
・If not specified, the set value +1 in the previous constant definition is used.

Example

ENUM #TYPE1=2,#TYPE2,#TYPE3
?#TYPE1,#TYPE2,#TYPE3
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
|