[↑]
SmileBASIC4 Replica Reference
A B C D E F G H I K L M N O P R S T U V W X
All references
@Label
Identifier indicating the location of the program or data
ABS (NumericValue)
Get the absolute value
ACCEL ControllerID[,SensorID] OUT X,Y,Z
Acquire accelerometer information
ACLS
ACLS GRPSaveFlag,SPDEFSaveFlag,GRPFSaveFlag[,ANIMDEFSaveFlag]
Clear all display settings and return to the startup state
ACOS (NumericValue)
Calculate the arc cosine (inverse function of COS)
ANIMDEF DefinitionNumber,AnimationTarget,DataArray [,Loop]
Animation definition
ANIMDEF DefinitionNumber,AnimationTarget,@Label[,Loop]
ANIMDEF DefinitionNumber,AnimationTarget,LabelString[,Loop]
Animation definition (specified with DATA command)
ANIMDEF DefinitionNumber,AnimationTarget,Time1,Item1[,Item2][,Time2,Item1[,Item2]]...[,Loop]
Animation definition (specify as direct arguments)
ANIMDEF DefinitionNumber
Clear the animation of the specified definition number
ANIMDEF
Clear all animation definitions
ARRAY% (NumberOfElements[,NumberOfElements...])
ARRAY#(NumberOfElements[,NumberOfElements...])
ARRAY$(NumberOfElements[,NumberOfElements...])
Create an array
ARYOP OperationType,ResultStorageArray,Parameter1,Parameter2[,Parameter3]
Perform a batch operation on elements in an array
ASC (String)
Get the character code of the first character of the string
ASIN (NumericValue)
Calculate the arc sine (inverse function of SIN)
ATAN (NumericValue)
Calculate the arc tangent (inverse function of TAN) (from numeric value)
ATAN (CoordinateY,CoordinateX)
Calculate the arc tangent (inverse function of TAN) (from XY coordinates)
ATTR [ScreenID,]HorizontalFlip,VerticalFlip,Rotation
ATTR [ScreenID,]DisplayAttribute
Set the attributes of characters to be displayed on the text screen
ATTR [ScreenID] OUT HorizontalFlip,VerticalFlip,Rotation
ATTR( [ScreenID])
Get display character attribute of text screen
About DEF User-Defined Commands
Using DEF, you can define your own commands like the below
About COMMON
A keyword used to define a user-defined command/function beyond the program slot
About array type references of strings
 
BACKCOLOR BackgroundColor
Set the background color of the BASIC display
BACKCOLOR ()
Get background color of the BASIC display
BACKTRACE
Display subroutine and user-defined commands call history
BEEP [SoundEffectNumber[,[Pitch][,[Volume][,[Panpot]]]]]
Play simple warning and sound effects
BEEP ([SoundEffectNumber[,[Pitch][,[Volume][,[Panpot]]]]])
Play simple warning and sound effects
BEEPPAN Handle,Panpot
Change the sound effect panpot
BEEPPIT Handle,Pitch
Change the pitch of sound effects
BEEPSTOP [Handle[,FadeTime]]
Stop sound effects
BEEPVOL Handle,Volume
Change sound effect volume
BGMCHK [TrackNumber] OUT Variable
Return the music playback status of the specified track
BGMCLEAR [UserDefinedMusicNumber]
Delete user-defined music
BGMCONT [TrackNumber[,FadeTime]]
Resume music playback when paused
BGMPAUSE [TrackNumber[,FadeTime]]
Pause music playback
BGMPITCH [TrackNumber,]Pitch
Change the reference pitch of the music being played
BGMPLAY [TrackNumber,]MusicNumber[,Volume][,FadeTime]
Start playing the specified music
BGMPLAY MMLString
Start playing the specified MML data
BGMSET UserDefinedMusicNumber,MMLString
Define user-defined music
BGMSETD UserDefinedMusicNumber,@LabelString
Predefine user-defined music
BGMSTOP [TrackNumber[,FadeTime]]
Stop playing music
BGMVAR TrackNumber,VariableNumber,Value
BGMVAR TrackNumber,VariableNumber OUT Variable
Set and get BGM track variable values
BGMVOL [TrackNumber,]Volume
Set the volume of the specified track
BGMWET [TrackNumber,]Wet
Set the effector level for the specified track
BIN$ (NumericValue[,NumberOfDigits])
Convert a numeric value to a binary string
BIQUAD OutputArray(OUT),InputArray(IN),FilterCoefficientArray(FP)
Apply biquadratic filter
BQPARAM FilterCoefficientArray,FilterType,SamplingFrequency,CutoffFrequency,QValueOrBandwidth[, AmplificationFactor]
Calculate filter coefficients of biquadratic filter
BREAK
Escape the loop forcibly
BREPEAT ButtonID,RepeatStartTime,RepeatInterval
Set the button repeat speed
BREPEAT ButtonID OUT RepeatStartTime,RepeatInterval
Get button repeat speed
BUTTON (ControllerID,ButtonID[,FunctionID])
Get the operation status of a specific button on the controller
BUTTON (ControllerID)
BUTTON(ControllerID,-1[,FunctionID])
Acquire all button status of controller together
CALL CommandName[,Parameter...][ OUT Variable1[,Variable2...]]
Call a user-defined command with a specified name
CALL (FunctionName[,Parameter...])
Call function with specified name
CALL SPRITE
CALL TEXT
Call callback
CALLIDX ()
Return the number associated with the callback
CASE Expression
Start conditional branch by CASE
CEIL (NumericValue)
Round up after the decimal point
CHKCALL (String)
Check if there is an command/function with the same name as the specified string
CHKCHR ([ScreenID,]CoordinatesX,Y)
Check the character code of the character displayed on the text screen
CHKCHR [ScreenID,]CoordinateX,Y OUT CharacterCode,DisplayAttribute
Check the character code and display attributes of characters displayed on the text screen
CHKCHR (ScreenID,CoordinatesX,Y,CoordinateConversionFlag)
Check the character code of the character displayed on the text screen
CHKCHR ScreenID,CoordinatesX,Y,CoordinateConversionFlag OUT CharacterCode,DisplayAttribute
Check the character code and display attributes of characters displayed on the text screen
CHKFILE ("[FileType:]FileNameString")
Check if the specified file exists
CHKLABEL (String[,Flag])
Check if a label with the same name as the specified string exists
CHKMML MMLString OUT Variable
Return whether the contents of the MML string can be correctly interpreted as MML
CHKVAR (String)
Check if a variable with the same name as the specified string exists
CHR$ (CharacterCode)
Return a character from a specified character code
CLASSIFY (NumericValue)
Judge normal numbers, infinity, and non-numeric values (NaN)
CLEAR
Initialize BASIC internal memory
CLIPBOARD String
Set clipboard contents
CLIPBOARD ()
Get clipboard contents
CLS
CLS ScreenID
Clear the text screen
COLOR [ScreenID,]ColorCode
Set the drawing color of characters
COLOR ([ScreenID])
Get the drawing color of characters
CONST #ConstantName=ConstantExpression[,#ConstantName=ConstantExpression]
Define constants
CONT
Resume execution of a stopped program.
CONTINUE
Force the next loop to start
CONTROLLER (ControllerID)
Check controller type and connection status
CONTROLLER ControllerID OUT ControllerType,MainColor,SubColor
CONTROLLER ControllerID OUT ControllerType,LeftMainColor,LeftSubColor,RightMainColor,RightSubColor
Check controller connection status and type
COPY (CopySourceArray[,CopySourceOffset[,NumberOfCopyElements]])
Copy an array
COPY (CopySourceString[,CopySourceOffset[,NumberOfCopyCharacters]])
Copy the string
COPY CopyDestinationArray[,CopyDestinationOffset],CopySourceArray[[,CopySourceOffset],NumberOfCopyElements]
Copy the contents of an array to another array
COPY CopyDestinationArray[,CopyDestinationOffset],LabelString[,NumberOfCopyData]
Read DATA column into array
COPY CopyDestinationStringVariable[,CopyDestinationOffset],CopySourceString[[,CopySourceOffset],NumberOfCopyCharacters]
Copy part or all of a string to another string variable
COS (Angle)
Calculate the cosine
COSH (NumericValue)
Calculate the hyperbolic cosine
DATA ConstantExpression[,ConstantExpression...]
Define data to be read by the READ command
DATE$ ()
Return current date as a string
DEC Variable[,Expression]
Subtract the result of the expression from the value in the variable
DEF DefinitionName
Define a user-defined command with no arguments and no return value
DEF DefinitionName Parameter[,Parameter...]
Define a user-defined command with parameters and no return value
DEF FunctionName([Parameter[,Parameter...]])
Define a user-defined function (user-defined command with only one return value)
DEF CommandName[Parameter[,Parameter...]] OUT ReturnValue [,ReturnValue...]]
Define a user-defined command with multiple return values
DEF CommandName * [OUT *]
Define a user-defined command with variable-length parameters and variable-length return values
DEFARG (ParameterNumber)
Check the value of parameters of a user-defined command/function
DEFARGC ()
Check the number of parameters of a user-defined command/function
DEFOUT ReturnValueNumber,Value
Specify the return value of a user-defined command/function
DEFOUTC ()
Check the number of return values of a user-defined command/function
DEG (NumericValue)
Convert angular units from radians to degrees
DELETE "[FileType:]FileName"
Deleting Files
DIALOG DisplayString[,SelectionType[,CaptionString[,TimeoutPeriod]]]
Display the dialog and wait until the button is pressed
DIALOG (DisplayString,ButtonType[,CaptionString[,TimeoutPeriod]])
Display dialog and wait until touch or hardware button is pressed
DIALOG (InitialString,CaptionString[,MaximumNumberOfCharacters])
Display a dialog dedicated to file name input
DIM (Array)
DIM(Array,Dimension)
Check the number of array dimensions and the number of elements in each dimension
DTREAD OUT Y,M,D[,W]
DTREAD DateString OUT Y,M,D[,W]
Convert date string to number
EFCEN State
EFCEN OUT Variable
Set/get effector status
EFCSET PresetNumber
Set effectors (preset designation)
EFCSET ReflectionSoundMode,ReflectionSoundVolume,ReflectionSoundTime,EchoMode,EchoVolume,EchoTime,HighSoundAttenuationRate,EchoTone,InputVolume
Set effectors (detailed settings)
EFCWET BEEPWet,BGMWet,TALKWet,PCMWet
Set effector wetness
ELSEIF Expression THEN ...
Keywords for executing additional IF statements when conditions are not satisfied by IF statements
END
Quit the program
END
Terminate DEF definition of a user-defined command/function
ENDCASE
Terminate conditional branch by CASE
ENDLOOP
Jump to the command immediately following the corresponding LOOP keyword
ENUM #ConstantName[=ConstantExpression][,#ConstantName[=ConstantExpression]]
Define constants with sequential numbers
ENVFOCUS Flag
Get and transfer focus
ENVFOCUS ()
Get focus status
ENVINPUT$ ([HistoryNumber])
Get the contents of console input line or input history of main interpreter
ENVLOAD 0,MainID,SubID
Copy the contents of the program slot on the main interpreter to the program slot on the sub interpreter side
ENVLOAD 1,MainID,SubID
Copy graphic page data on the main interpreter to the sub interpreter
ENVLOAD 2,MainID,SubID
Copy the SPDEF definition on the main interpreter to the sub interpreter side
ENVPROJECT
Synchronize the sub interpreter work project with the main interpreter work project
ENVSAVE 1,SubID,MainID
Copy graphic page data on the sub interpreter to the main interpreter
ENVSAVE 2,SubID,MainID
Copy the SPDEF definition on the sub interpreter to the main interpreter
ENVSTAT Status
Set the status of the main interpreter
ENVSTAT ()
Get the status of the main interpreter
ENVSTAT OUT Status,ExecutionSlot,EditSlot
Get the status of the main interpreter
ENVSTAT OUT Status,ErrorNumber,ErrorArgumentNumber,ErrorSlot,ErrorCharacterPosition,ErrorLine
Get the status of the main interpreter
ENVTYPE ()
ENVTYPE OUT Type,Parameter
Get the interpreter on which the currently running program is operating
EXEC "[FileType:]FileNameString"[,Slot]
Loading and Executing Programs
EXEC Slot
Run the Program in the Specified Slot
EXP ([NumericValue])
Calculates the power of e(BaseOfNaturalLogarithms)
FADE FadeColor
Apply a fade effect to the display
FADE FadeColor,Time
Apply fade-in and fade-out effects
FADE ()
Get the current fade color
FADECHK ()
Check if it's during fade-in/fade-out
FFT OutputRealPartArray,OutputImaginaryPartArray,InputRealPartArray,InputImaginaryPartArray[,WindowFunctionValueArray]
Perform Fourier transform on complex array
FFTWFN Array,WindowFunctionType
Obtain window function value array
FILES ["FileType:"]
FILES "[FileType:] ProjectName"
Display a List of Files on the Console
FILES "//"
Display a List of Projects on the Console
FILES (["FileType:"])
FILES("[FileType:] ProjectName")
Create an Array Containing a List of Files and Projects
FILES ("//")
Create an Array Containing a List of Projects
FILES ["FileType:",]StringArray
FILES "[FileType:]ProjectName,StringArray
Get a List of Files in Array
FILES "//",StringArray
Get a List of Projects in Array
FILL Array,Value[,Offset[,NumberOfElements]]
Set all array contents to the specified value
FIND (Array,Value)
Search an array for a specified value and return the found position
FIND Array,Value OUT Index1[,Index2...]
Search an array for a specified value and return the found position
FLOAT (NumericValue)
Convert to Real type
FLOOR (NumericValue)
Round down decimal places
FONTINFO CharacterCode,FontType OUT X,Y
FONTINFO String,FontType OUT X,Y
Get font storage coordinates
FOR LoopVariable=InitialValue TO EndValue
FOR LoopVariable=InitialValue TO EndValue STEP Increment
Repeat the process a specified number of times
FORMAT$ (FormatString,Value,...)
Format the value into a string using the display format
FREEMEM ()
FREEMEM OUT TotalFreeSpace,ContinuousFreeSpace
Get free memory space for strings and arrays
GARRAY (GraphicPage)
Get an Int array representing the contents of a graphic page
GBOX StartPointX,StartPointY,EndPointX,EndPointY[,ColorCode[,DrawingMethod]]
Draw a rectangle on the graphic page
GCIRCLE CenterPointX,CenterPointY,Radius[,ColorCode [,DrawingMethod]]
Draw a circle on the graphic page
GCIRCLE CenterPointX,CenterPointY,Radius,StartAngle,EndAngle,Flag[,ColorCode [,DrawingMethod]]
Draw an arc on the graphic page
GCLIP [StartPointX,StartPointY,EndPointX,EndPointY]
Specify the writing clipping area of the graphic page
GCLIP OUT StartPointX,StartPointY,EndPointX,EndPointY
Get the writing clipping area of graphic page
GCLS [ColorCode]
Fill the graphic page with the specified color
GCOLOR ColorCode
Specify graphic drawing color
GCOLOR ()
Get graphics drawing color
GCOPY [SourcePage,]StartPointX,StartPointY,EndPointX,EndPointY,TransferDestinationX,TransferDestinationY,DrawingMethod
Copy images from other graphic pages
GCOPY SourcePage,StartPointX,StartPointY,EndPointX,EndPointY,TransferDestinationX,TransferDestinationY,ColorCode,DrawingMethod
Copy images from other graphic pages
GFILL StartPointX,StartPointY,EndPointX,EndPointY[,ColorCode[,DrawingMethod]]
Draw a rectangle on the graphic page and fill it
GLINE StartPointX,StartPointY,EndPointX,EndPointY[,ColorCode[,DrawingMethod]]
Draw a straight line on the graphic page
GLOAD [X,Y,Width,Height,]ImageArray,DrawingMethod
GLOAD [X,Y,Width,Height,]ImageArray,ColorCode,DrawingMethod
Copy image data from array to graphic page
GLOAD [X,Y,Width,Height,]IndexImageArray,PaletteArray,DrawingMethod
GLOAD [X,Y,Width,Height,]IndexImageArray,PaletteArray,ColorCode,DrawingMethod
Copy image data to graphic page while converting color from index image array
GOSUB @Label
GOSUB String
Jump to the specified label position
GOTO @Label
GOTO String
Jump to the specified label position
GPAINT StartPointX,StartPointY[,FillColor]
GPAINT StartPointX,StartPointY[,FillColor,BorderColor]
Fill the graphic page
GPGET (CoordinateX,CoordinateY)
Get the color of the specified coordinates on the graphic page
GPSET CoordinateX,CoordinateY[,ColorCode[,DrawingMethod]]
Dots on the graphic page
GPUTCHR X,Y,"String"[,FontType[,ColorCode[,DrawingMethod]]]
GPUTCHR X,Y,"String",FontType,ScaleX,ScaleY,ColorCode[,DrawingMethod]
Draw characters on the graphic page
GPUTCHRP X,Y,"String"[,FontType[,ColorCode[,DrawingMethod]]]
GPUTCHRP X,Y,"String",FontType,ScaleX,ScaleY,ColorCode[,DrawingMethod[,CharacterSpacing]]
Draw proportional characters on graphic pages
GPUTCHRP ("String"[,FontType[,ScaleX[,CharacterSpacing]]])
Calculate the drawing width when drawing a string with GPUTCHRP
GSAMPLE GraphicPage,SamplingType
Set the sampling method for graphic pages
GSAMPLE (GraphicPage)
Get sampling method of graphic page
GSAVE [SourcePage,][X,Y,Width,Height,]DestinationArray
Copy image to array
GTARGET DrawingTargetPage
Specifying the graphic drawing target page
GTARGET ()
Get the current graphics drawing target page
GTRI X1,Y1,X2,Y2,X3,Y3[,ColorCode[,DrawingMethod]]
Draw a triangle on the graphic page and fill it
GUPDATE GraphicPage[,StartPointX,StartPointY,EndPointX,EndPointY]
Reflect the contents written by GARRAY in the display
GYROA ControllerID [,SensorID] OUT X,Y,Z
Get the angle of gyroscope
GYROSYNC ControllerID [,SensorID]
Reset the angle of gyroscope
GYROV ControllerID [,SensorID] OUT X,Y,Z
Get angular velocity of gyroscope
HELPGET CommandNameString,PageNumber OUT LineStringArray,TagArray,AttributeNumericArray,CodeExampleString
Get help data
HELPINFO OUT CommandNameString,NumericArray
Information of help data at the cursor position
HELPINFO CommandNameString OUT NumericArray
Help data information for command names
HEX$ (NumericValue[,NumberOfDigits])
Convert a numeric value to a hexadecimal string
HSV (Hue,Saturation,Value[,Transparency])
Calculate color code from HSV value
HSV ColorCode OUT Hue,Saturation,Value[,Transparency]
Convert color code to HSV value
HSVF (Hue,Saturation,Value[,Transparency])
Calculate color code from HSV value (floating point version)
HSVF ColorCode OUT Hue,Saturation,Value[,Transparency]
Convert color code to HSV value (floating point version)
IF Expression THEN CodeBlock1
IF Expression THEN CodeBlock1 ELSE CodeBlock2
CodeBlock1 is executed when the value of the expression is true (other than 0)
IF Expression THEN [LineFeed] CodeBlock1 ENDIF
IF Expression THEN [LineFeed] CodeBlock1 ELSE [LineFeed] CodeBlock2 ENDIF
CodeBlock1 is executed when the value of the expression is true (other than 0)
IF Expression GOTO @Label [ELSE CodeBlock]
Branch to label when expression is true (other than 0)
IFFT OutputRealPartArray,OutputImaginaryPartArray,InputRealPartArray,InputImaginaryPartArray
Perform inverse Fourier transform on complex array
INC Variable[,Expression]
Add the result of the expression to the value in the variable
INKEY$ ()
INKEY$(ControllerInputExclusionFlag)
Get one character entered from the keyboard
INPUT ["GuideString";]Variable[,Variable2...]
Enter numbers or strings from the keyboard
INSERT Array,InsertionPosition[,NumberOfElements[,InitialValue]]
Insert elements into a 1D array
INSPECT Value
Display detailed value information
INSTR (String,SearchString)
INSTR(StartPosition,String,SearchString)
Search the specified string in the string and return the position
INT (NumericValue)
Convert to Int type
IRREAD ControllerID OUT SamplingNumber,NoiseLevel,NumberOfData,DataArray
Read IR Motion Camera recognition results
IRSPRITE ControllerID,SpriteID
Paste motion IR Motion Camera image acquired in the shooting mode to sprite
IRSTART ControllerID,IRRecognitionType
Start using the IR Motion Camera
IRSTART ControllerID,0,[LightingType],[Gain],[Exposure],[MinCluster],[MaxCluster],[MinBrightness]
Start using IR Motion Camera (Clustering mode detailed parameter setting type)
IRSTART ControllerID,1,[LightingType],[Gain],[Exposure],[ImageSize]
Start using the IR Motion Camera (shooting mode detailed parameter setting type)
IRSTART ControllerID,2,[LightingType],[Gain],[Exposure]
Start using the IR Motion Camera (moment mode detailed parameter setting type)
IRSTATE (ControllerID)
Get IR Motion Camera starting status
IRSTOP ControllerID
Stop using the IR Motion Camera
KEY KeyNumber,String
Set the function key contents
KEY (FunctionKeyNumber)
Get the contents of a function key
KEYBOARD (ScanCode[,FunctionID])
KEYBOARD ScanCode [,FunctionID] OUT Result,ModifierKeyInformation
Get USB keyboard input information
LAST (String)
LAST(Array)
Return the subscript number at the end of a string or array
LEFT$ (String,NumberOfCharacters)
Get substrings of the specified number of characters from the beginning of the string
LEN (String)
LEN(Array)
Get the number of characters in a string or the number of elements in an array
LINPUT ["GuideString";]StringVariable
Get string from keyboard
LIST
Switch to edit mode
LIST [ProgramSlot:]LineNumber
Switch to Edit Mode and move the cursor to the specified line number of the specified program slot
LIST ERR
Switch to Edit Mode and move the cursor to the position where the error occurred immediately before.
LOAD "[FileType:]FileName"[,Slot]
Load the Program
LOADG "[FileType:]FileName",GraphicPage[,OX,OY]
LOADG "[FileType:]FileName",GraphicPage[,OX,OY] OUT Width,Height
Load Image Files
LOADV ("FileType:FileName")
Read File Contents and Return as String or Array
LOADV "FileType:FileName",Array
Read the Contents of a File into an Array
LOCATE [CoordinateX],[CoordinateY]
LOCATE ScreenID,[CoordinateX],[CoordinateY]
Specify the character display coordinates to the text screen
LOCATE [ScreenID] OUT CoordinateX,CoordinateY
Get character display coordinates
LOG (NumericValue[,Base])
Calculate the logarithm
LOOP
LOOP to ENDLOOP loop start keyword
MAINCNT ()
Return the elapsed time since launching SmileBASIC
MAX (NumericArray)
Get the largest value in a specified numeric array
MAX (NumericValue,NumericValue[,NumericValue...])
Get the largest value from multiple specified numbers
MBUTTON ()
Get all mouse button statuses together
MBUTTON (ButtonID[,FunctionID])
Get the operation status of a specific mouse button
METAEDIT MetadataItems,SettingData
Set metadata items
METAEDIT MetadataItem OUT SettingData
Get the currently set metadata item
METALOAD ["ProjectName"]
Load the metadata of the specified project
METASAVE
Save metadata
MID$ (String,StartPosition [,NumberOfCharacters])
Get substring of the specified number of characters from specified position of the string
MILLISEC ()
Returns the elapsed time since launching SmileBASIC4
MIN (NumericArray)
Get smallest value in a specified numeric array
MIN (NumericValue,NumericValue[,NumericValue...])
Get the smallest value from multiple specified numbers
MOUSE [CoordinateSystemConversionFlag] OUT X,Y [,Wheel]
Return mouse coordinate information
MOUSE X,Y[,CoordinateSystemConversionFlag]
Set mouse coordinates
NEW
Erase the program in all program slots
NEW ProgramSlot
Erase the program in the specified program slot
Command indicating the end of a FOR loop
ON Expression GOTO @Label0,@Label1…
Branch to the label line corresponding to the value of the expression
ON Expression GOSUB @Label0,@Label1…
Branch to the label line corresponding to the value of the expression and return to the next command after ON GOSUB by using the RETURN command
ON BREAK GOTO @Label
Register the jump destination when the user tries to stop the program
OPTION FunctionName
Set the program operation mode
OTHERWISE
Specify what to do when none of the WHENs is correspond within CASE to ENDCASE
PCMCONT
Resume PCM playback
PCMPOS PlaybackPosition
Set the PCM playback position
PCMPOS OUT Variable
Get PCM playback position
PCMSTOP
Stop PCM playback
PCMSTREAM PCMDataArray[,SamplingFrequency]
Start PCM playback
PCMSTREAM PCMDataArrayL,PCMDataArrayR[,SamplingFrequency]
Start PCM playback
PCMVOL Channel,Volume[,NumberOfSamples]
Set the PCM volume
PCMVOL [Channel,]Volume
Set the PCM volume
PCMVOL OUT LeftVolume[,RightVolume]
Get PCM volume
PERFBEGIN MeasurementNumber [,ColorCode]
Start execution time measurement
PERFEND MeasurementNumber
Finish the execution time measurement and register the result in the performance gauge
PERFEND (MeasurementNumber)
Finish the execution time measurement and register the result in the performance gauge
POP (Array)
Extract elements from the end of an array
POW (NumericValue,Multiplier)
Calculate the power
PRGDEL [NumberOfDeletedLines]
Delete the current line
PRGEDIT ProgramSlot[,LineNumber]
Start source code operation on the editor
PRGEDIT ()
PRGEDIT OUT [ProgramSlot,]LineNumber
Get source code information in operation
PRGGET$ ([AutoSeekFlag])
Get one line of string for the current line
PRGINS String [,Flag]
Insert a one line string into the current line
PRGNAME$ ([ProgramSlot])
Get program file name
PRGSEEK [MovementDirection]
PRGSEEK([MovementDirection])
Move the current line back and forth one line
PRGSET String
Replace the contents of the current line with the specified string
PRGSIZE ([ProgramSlot[,ValueTypeToGet]])
Get the number of lines of source code
PRINT [Expression[;Or,Expression...]]
Console character display
PROJECT "ProjectName"
Changing the current project
PROJECT ()
Get the Current Project
PUSH Array,Expression
Add elements to the end of an array
PUSHKEY String
It is assumed that the specified string has been entered from the keyboard.
RAD (NumericValue)
Convert angular units from degrees to radians
RANDOMIZE SeedID [,SeedValue]
Initialize the random number sequence
READ Variable1[,Variable2...]
Read the value defined by the DATA command
RECCHK OUT State
Get recording status by RECSTART
RECDATA SamplePosition OUT Left,Right
Extract sample values recorded with RECSTART
RECLEN ()
Returns the number of buffer samples allocated by RECSTART
RECPOS ()
Returns the current sample position recorded with RECSTART
RECSAVE Array[,SampleNumber][,SamplePosition]
Extract sample values recorded with RECSTART into an array
RECSTART Time
Record sound played on BEEP/BGMPLAY/TALK
RECSTART
Record sound played on BEEP/BGMPLAY/TALK
RECSTOP
Stop recording with RECSTART
REM
'
Symbol for comment description
REMOVE Array,DeletionPosition [,NumberOfElements]
Delete 1D array elements
RENAME "[FileType1:]FileName1","[FileType2:]FileName2"
Rename the File
REPEAT
REPEAT-UNTIL loop start command
RESIZE Array,NumberOfElements[,NumberOfElements...]
Change the size of an array
RESTORE @Label
RESTORE String
Change the DATA statement read with the READ command
RESULT ()
Get the execution result of some commands
RETURN
Jump to the command following the GOSUB command used immediately before.
RETURN Value
Set the return value of DEF and return to the caller
RGB (R,G,B)
RGB(A,R,G,B)
Calculate color code from RGB values
RGB (ColorCode,[A],[R],[G],[B])
Replace each component of the color code
RGB ColorCode OUT R,G,B
RGB ColorCode OUT A,R,G,B
Get RGB components from color code
RGBF (R,G,B)
RGBF(A,R,G,B)
Calculate color code from floating point RGB values
RGBF (ColorCode,[A],[R],[G],[B])
Replace each component of the color code
RGBF ColorCode OUT R,G,B
RGBF ColorCode OUT A,R,G,B
Get RGB components from color code (floating point version)
RIGHT$ (String,NumberOfCharacters)
Get substring of the specified number of characters from the end of the string
RINGCOPY CopyDestinationArray,CopyDestinationOffset,CopySourceArray[[,CopySourceOffset],NumberOfCopyElements]
RINGCOPY CopyDestinationArray,CopyDestinationOffset,CopySourceArray[[,CopySourceOffset],NumberOfCopyElements] OUT Variable
Recognize array as ring buffer and copy data to it
RND ([SeedID,]MaximumValue)
Get Int random number
RNDF ([SeedID])
Get a Real random number
ROUND (NumericValue)
Round off the fractional part to the nearest Int
RSORT [StartPosition,NumberOfElements,]Array1[,Array2,...]
Sort the array in descending order
RUN
Execute the program in program slot 0.
RUN ProgramSlot
Execute the program in the specified program slot.
SAVE "[FileType:]FileName"[,Slot]
Save the Program
SAVEG "[FileType:]FileName",GraphicPage[,StartPointX,StartPointY,Width,Height]
Save Graphic Page Contents to File
SAVEG "JPG:FileName",GraphicPage[,StartPointX,StartPointY,Width,Height] [,CompressionAmount]
Save the Contents of a Graphic Page to a File in High Compression Format
SAVEV "FileType:FileName",Variable
Save Variable Contents to File
SCROLL [ScreenID,]NumberOfCharactersX,NumberOfCharactersY
Scroll the contents of the text screen
SGN (NumericValue)
Get the sign
SHIFT (Array)
Extract elements from the beginning of an array
SIN (Angle)
Calculate the sine
SINH (NumericValue)
Calculate the hyperbolic sine
SNDMSBAL Balance[,FadeTime]
Set the volume balance of the main/sub interpreter
SNDMSBAL OUT Balance
Obtaine the volume balance of the main/sub interpreter
SNDMVOL Volume[,FadeTime]
Set the overall sound volume
SNDMVOL OUT Volume
Get the volume of the entire sound
SNDSTOP
Stop all sounds
SORT [StartPosition,NumberOfElements,]Array1[,Array2,...]
Sort the array in ascending order
SPANIM SpriteNumber,AnimationTarget,DataArray [,Loop]
Set animation for sprites
SPANIM SpriteNumber,AnimationTarget,"@LabelString"[,Loop]
Set animation to sprite (specified with DATA command)
SPANIM SpriteNumber,AnimationTarget,Time1,Item1[,Item2][,Time2,Item1[,Item2]]...[,Loop]
Set animation for sprites (specify as direct argument)
SPANIM SpriteNumber,AnimationDefinitionNumber
Set animation to sprite (specified by animation definition number)
SPANIM [SpriteNumber]
Clear sprite animation
SPCHK (SpriteNumber)
Get animation state of sprite
SPCHR SpriteNumber,DefinitionNumber
Change sprite character definition
SPCHR SpriteNumber,[U],[V],[W],[H],[Attribute]
Change sprite character definition
SPCHR SpriteNumber OUT U,V[,W,H[,ATR]]
Get sprite character definition attributes
SPCHR (SpriteNumber)
Get a sprite character definition number
SPCLR
Delete all sprites
SPCLR SpriteNumber
Delete the specified sprite
SPCLR SpriteNumber1,SpriteNumber2
Delete sprite in specified range
SPCOL SpriteNumber[,ScaleSupport]
Set sprite collision detection attribute
SPCOL SpriteNumber,[ScaleSupport],Mask
Set sprite collision detection attribute (with mask specification)
SPCOL SpriteNumber,StartPointX,StartPointY,Width,Height[,ScaleSupport]
SPCOL SpriteNumber,StartPointX,StartPointY,Width,Height,[ScaleSupport],Mask
Set sprite collision detection attribute (with range specification)
SPCOL SpriteNumber OUT ScaleSupport[,Mask]
Get sprite collision detection attribute (scale support and mask)
SPCOL SpriteNumber OUT StartPointX,StartPointY,Width,Height[,ScaleSupport[,Mask]]
Get sprite collision detection attributes (all)
SPCOLOR SpriteNumber,ColorCode
Set the sprite display color
SPCOLOR (SpriteNumber)
Get the sprite display color
SPCOLVEC SpriteNumber[,MovementAmountX,MovementAmountY]
Set the movement speed for sprite collision detection
SPDEF DefinitionNumber,U,V[,W,H[,OriginX,OriginY]][,Attribute]
Create a character definition template for sprites
SPDEF NumericArray[,DefinitionNumberOffset[,UOffset,VOffset]]
Create sprite character definition templates in batch from an array
SPDEF "@LabelString"[,DefinitionNumberOffset[,UOffset,VOffset]]
Create sprite character definition templates in batch from DATA column
SPDEF DefinitionNumber OUT U,V[,W,H[,HX,HY]][,A]
Get attribute on character definition template of sprite
SPDEF DefinitionNumber,SourceDefinitionNumber,[U],[V],[W],[H],[OriginX],[OriginY],[Attribute]
Copy the sprite character definition template
SPDEF
Return the sprite character definition template to the initial state
SPFUNC SpriteNumber, "@Label"
SPFUNC SpriteNumber,"UserDefinedCommandName"
Assign callback processing for each sprite
SPFUNC SpriteNumber
Clear callback processing assigned to sprite
SPHIDE SpriteNumber
SPHIDE SpriteNumber,DisplayOffFlag
Hide sprite display
SPHIDE (SpriteNumber)
Get whether sprite is off
SPHITINFO ()
Get the detailed information on collision detection results (collision time)
SPHITINFO OUT TM,X1,Y1,X2,Y2
Get the detailed information of collision detection results (collision time and coordinates)
SPHITINFO OUT TM,X1,Y1,VX1,VY1,X2,Y2,VX2,VY2
Get the detailed information of collision detection results (collision time, coordinates and velocity)
SPHITRC (StartPointX,StartPointY,Width,Height[,[Mask],MovementAmountX,MovementAmountY])
Return collision detection result of moving rectangle and all sprites
SPHITRC (SpriteNumber,StartPointX,StartPointY,Width,Height[,[Mask],MovementAmountX,MovementAmountY])
Return collision detection result of specified sprite and rectangle
SPHITRC (StartID,EndID,StartPointX,StartPointY,Width,Height[,[Mask],MovementAmountX,MovementAmountY])
Return the result of collision detection between a sprite in the specified range and a rectangle
SPHITRC ()
Return the sprite collision detection result from the previously set information
SPHITSP (SpriteNumber[,StartID,EndID])
Return sprite collision detection result
SPHITSP (SpriteNumber,OpponentSpriteNumber)
Return sprite collision detection result with specified sprite
SPHITSP ()
Return the sprite collision detection result from the previously set information
SPHOME SpriteNumber,CoordinateX,CoordinateY
Specify the sprite's home coordinate (coordinate reference point)
SPHOME SpriteNumber OUT HX,HY
Get home position of sprite
SPLAYER SpriteNumber,LayerID
Set the layer to which the specified sprite belongs
SPLAYER (SpriteNumber)
Get the layer to which the specified sprite belongs
SPLAYER LayerID
Set the layer to which the sprite to be created belongs
SPLAYER ()
Get the layer to which the sprite to be created belongs
Link a sprite to another sprite
SPLINK (SpriteNumber[,LinkType])
Get the link number of the specified number sprite
SPOFS SpriteNumber,[X],[Y][,Z]
Move the sprite
SPOFS SpriteNumber[,CoordinateSystemFlag] OUT X,Y[,Z]
Get display coordinates of sprite
SPPAGE SpriteNumber,GraphicPage
Set the reference graphic page of the specified sprite
SPPAGE (SpriteNumber)
Get the reference graphic page of the specified sprite
SPPAGE GraphicPage
Set the graphic page assigned to the sprite to be created
SPPAGE ()
Get the graphic page assigned to the sprite to be created
SPROT SpriteNumber,Angle
Rotate the sprite
SPROT (SpriteNumber)
Get sprite rotation angle
SPSCALE SpriteNumber,MagnificationX,MagnificationY
Change the sprite scale (display magnification)
SPSCALE SpriteNumber OUT SX,SY
Get sprite display magnification
SPSET SpriteNumber,DefinitionNumber[,DisplayFlag]
Create sprites (using definition templates)
SPSET SpriteNumber,U,V,W,H[,Attribute[,DisplayFlag]]
Create sprite (specify image attribute etc. directly)
SPSET (DefinitionNumber[,DisplayFlag])
Search for an available number, create a sprite, and return the number
SPSET (U,V,W,H,Attribute[,DisplayFlag])
Search for an available number, create a sprite, and return the number
SPSET (StartNumber,EndNumber,DefinitionNumber[,DisplayFlag])
Search for an available number, create a sprite, and return the number
SPSET (StartNumber,EndNumber,U,V,W,H,Attribute[,DisplayFlag])
Search for an available number, create a sprite, and return the number
SPSHOW SpriteNumber
SPSHOW SpriteNumber,DisplayFlag
Display sprite
SPSHOW (SpriteNumber)
Get whether sprite is displayed
SPSTART [SpriteNumber]
Resume sprite animation
SPSTOP [SpriteNumber]
Stop sprite animation
Unlink sprites
SPUSED (SpriteNumber)
Check if specified sprite is used
SPVAR SpriteNumber,VariableKey,Value
Set sprite variables
SPVAR (SpriteNumber,VariableKey)
Read sprite variables
SPVAR SpriteNumber[,VariableKey]
Delete sprite variables
SQR (NumericValue)
Calculate the square root
STICK ControllerID[,StickID] OUT X,Y
Check controller Stick status
STOP [DisplayString]
Suspending a running program
STR$ (NumericValue[,NumberOfDigits])
Convert numeric value to string
SUBHIDE
Hide the subprogram display
SUBRUN FileNameString
Load the specified program on the subprogram side and start execution as a subprogram
SUBSHOW
Display the subprogram display
SUBST$ (String,StartPosition,ReplacementString)
SUBST$(String,StartPosition,NumberOfCharacters,ReplacementString)
Create a new string by replacing part of the string
SUBSTOP
Stop the running subprogram from the main program side
SWAP Variable1,Variable2
Exchange values in two variables
SYSPARAM (InformationNameString)
SYSPARAM InformationNameString OUT SettingValue1,SettingValue2
SYSPARAM InformationNameString,SettingValue
Get and set various information
TALK String
Start speech synthesis according to the given string
TALKCHK OUT Variable
Check the speech synthesis status
TALKSTOP
Stop speech synthesis
TAN (Angle)
Calculate the tangent
TANH (NumericValue)
Calculate the hyperbolic tangent
TANIM ScreenID,AnimationTarget,DataArray[,Loop]
Set animation on the text screen (specified by array)
TANIM ScreenID,AnimationTarget,"@LabelString"[,Loop]
Set animation on the text screen (specified with DATA command)
TANIM ScreenID,AnimationTarget,Time1,Item1[,Item2][,Time2,Item1[,Item2]]...[,Loop]
Set animation on the text screen (directly specified as an argument)
TANIM ScreenID,AnimationDefinitionNumber
Set the animation on the text screen (specified by the animation definition number)
TANIM [ScreenID]
Clear the animation set in the text screen
TARRAY (ScreenID)
Get an Int array representing the contents of text screen
TBLEND ScreenID,CompositeMethod
Set the text screen composition method
TBLEND (ScreenID)
Get text screen composition method
TCBIKE ControllerID OUT RecognitionFlag[,HandleTilt,AccelAmount,AccelAngle,WheelieAngle]
Get the recognition information of Toy-Con Motorbike
TCCAR ControllerID OUT RecognitionFlag[,Accelerator,WheelInput[,WheelAngle,LeftLever,RightLever,Cord,SideLever,LeftGimmick,RightGimmick]
Get recognition information of Toy-Con Car
TCFISHING ControllerID OUT RecognitionFlag[,FishingRodYaw,FishingRodPitch,ReelSpeed,FishingRodYawAngle,FishingRodPitchAngle]
Get recognition information for Toy-Con Fishing Rod
TCHK (ScreenID)
Get text screen animation state
TCHOUSE ControllerID OUT RecognitionFlag,InformationArray
Get Toy-Con recognition information
TCOLOR ScreenID,ColorCode
Set the color to multiply the entire text screen
TCOLOR (ScreenID)
Get the color to multiply the entire text screen
TCOORD ScreenID, ConvertSourceCoordinatesX,Y [,Mode] OUT ConvertResultCoordinatesX,Y
Convert display coordinates to text screen coordinates
TCOPY CopyDestinationScreenID[,CopySourceScreenID],StartPointX,StartPointY,EndPointX,EndPointY,TransferDestinationX,TransferDestinationY
Copy the character information in the text screen
TCPIANO ControllerID OUT RecognitionFlag[,KeyButtonInformation,DialType,DialRotationAngularVelocity]
Get Toy-Con Piano recognition information
TCPLANE ControllerID OUT RecognitionFlag[,Accelerator,StickX,StickY]
Get recognition information of Toy-Con Plane
TCROBOT ControllerID OUT RecognitionFlag,LimbInformationArray[,Pitch,Roll,Yaw]
Get recognition information of Toy-Con Robot
TCSUBM ControllerID, OUT RecognitionFlag[,Accelerator,LeftWheelAngle,RightWheelAngle]
Get recognition information of Toy-Con Submarine
TCVEHICLE (ControllerID)
Return the currently recognized DriveKit Toy-Con type
TCVISOR ControllerID OUT RecognitionFlag,Pitch,Roll,Yaw
Get visor recognition information of Toy-Con Robot
TFILL ScreenID,StartPointX,StartPointY,EndPointX,EndPointY,CharacterCode[,DisplayAttribute]
TFILL ScreenID,StartPointX,StartPointY,EndPointX,EndPointY,String [,DisplayAttribute]
Fill the specified area of the text screen with the specified character/string
TFUNC ScreenID,"@Label"
TFUNC ScreenID,"UserDefinedCommandName"
Assign a callback process for each text screen
TFUNC ScreenID
Clear callback processing assigned to text screen
THIDE ScreenID
Hide text screen
THIDE (ScreenID)
Get text screen display status
THOME ScreenID,HomeCoordinateX,HomeCoordinateY
Set the home coordinate (coordinate reference point) of the text screen
THOME ScreenID OUT HomeCoordinateX,HomeCoordinateY
Get text screen home coordinates
TIME$ ()
Return current time as a string
TLAYER ScreenID,LayerID
Set the layer to which the text screen belongs
TLAYER (ScreenID)
Get the layer to which the text screen belongs
TLOAD WritingScreenID,[X,Y,Width,Height,]TransferSourceArray
Copy character information from array to text screen
TMREAD OUT H,M,S
TMREAD TimeString OUT H, M, S
Convert time string to number
TOFS ScreenID,X,Y[,Z]
Set text screen display coordinates
TOFS ScreenID OUT X,Y[,Z]
Get text screen display coordinates
TOUCH [TouchID[,CoordinateSystemConversionFlag]] OUT TouchTime,X,Y[,TouchArea]
Return touch information on the touch screen
TPAGE [ScreenID,]GraphicPage,ReferenceOriginX,ReferenceOriginY
Set a reference graphic page for user-defined characters
TPAGE [ScreenID] OUT GraphicPage,ReferenceOriginX,ReferenceOriginY
Get a reference graphic page for user-defined characters
TPRINT ScreenID[,Expression[;Or,Expression...]]
Character display on text screen
TPUT ScreenID,X,Y,CharacterCode[,DisplayAttribute]
TPUT ScreenID,X,Y,String[,DisplayAttribute]
Write a character at the specified coordinates on the text screen
TRACE
Execute only one command of a stopped program
TROT ScreenID,Angle
Set text screen rotation angle
TROT (ScreenID)
Get text screen rotation angle
TSAVE ReadoutScreenID,[X,Y,Width,Height,]TransferDestinationArray
Copy text screen character information to array
TSCALE ScreenID,MagnificationX,MagnificationY
Enlarge/reduce the text screen
TSCALE ScreenID OUT MagnificationX,MagnificationY
Get the scale of the text screen
TSCREEN FontType[,CharacterSize]
Set the width of the console (text screen 4) and the font used for display
TSCREEN ScreenID,FontType,CharacterSize[,Width,Height]
TSCREEN ScreenID,FontType,Width,Height
Set text screen size and font used for display
TSCREEN [ScreenID] OUT FontType,CharacterSize,Width,Height
Get text screen size and font used for display
TSHOW ScreenID
Display text screen
TSHOW (ScreenID)
Get text screen display status
TSTART [ScreenID]
Start text screen animation
TSTOP [ScreenID]
Stop the text screen animation
TUPDATE ScreenID [,StartPointX,StartPointY,EndPointX,EndPointY]
Reflect the contents written by TARRAY in the display
TVAR ScreenID,VariableKey,Value
TVAR ScreenID,VariableKey
Write to text screen variables
TVAR (ScreenID,VariableKey)
Get text screen variable
TVAR ScreenID[,VariableKey]
Delete text screen variables
TYPEOF (Value)
Find the value type
UNSHIFT Array,Expression
Add elements to the beginning of an array
UNTIL Expression
If the expression evaluates to false (0), jumps to the corresponding REPEAT command.
VAL (String)
Convert a string representing a number into a numeric value
VAR Variable[=Expression][,Variable[=Expression]...]
DIM Variable[=Expression][,Variable[=Expression]...]
Define variables explicitly
VAR ArrayVariableName[[NumberOfElements[,NumberOfElements...]]]
DIM ArrayVariableName[[NumberOfElements[,NumberOfElements...]]]
Create an array and set it to a variable
VAR ArrayVariableName[[NumberOfElements[,NumberOfElements...]]]=[Value1,Value2,...]
DIM ArrayVariableName[[NumberOfElements[,NumberOfElements...]]]=[Value1,Value2,...]
Create an array, set the value of the element in advance and set it to the variable
VIBRATE ControllerID [,LeftRightDesignation],VibrationPatternNumber
Vibrate the controller
VIBRATE ControllerID [,LeftRightDesignation],LowBandFrequency,LowBandAmplitude,HighBandFrequency,HighBandAmplitude
Specify the frequency and amplitude to vibrate the controller
VIBRATE (ControllerID[,LeftRightDesignation])
Get controller vibration status
VIBRATE
Stop vibration of all controllers
VSYNC [FrameCount]
Stop program execution until the specified frame count elapses
Variable = Expression
Substitute the result of an expression into a variable
WAIT [FrameCount]
Stop program execution until the specified frame count elapses
WAVSET InstrumentNumber,Attack,Decay,Sustain,Release,DefinitionString[,ReferencePitch]
Set the instrument sound waveform
WAVSETA InstrumentNumber,Attack,Decay,Sustain,Release,Array[,ReferencePitch][,WaveStart][,WaveEnd]
Set the instrument sound waveform
WAVSETA InstrumentNumber,Attack,Decay,Sustain,Release,Array,ReferencePitch,LoopStart,LoopEnd,SampleFrequency[,Offset][,BEEPLoopFlag]
Set the instrument sound waveform
WEND
Jump to the previous WHILE command and execute again from WHILE.
WHEN Expression
Specify the branch condition in CASE to ENDCASE
WHILE Expression
If the calculation result of the expression is false (0), jumps to the command following the next WEND.
XCTRLSTYLE MaxNumberOfConnections,OperationStyle[,MotionSensorUseFlag,IRSensorUseFlag[,ConnectionDialogFlag]]
Set the maximum number of controllers connections, operation style, and functions
XCTRLSTYLE 0
Reset the controller operation style to the startup state
XCTRLSTYLE OUT MaxNumberOfConnections,OperationStyle
Obtaining the current maximum controller connections and operation style
XCTRLSTYLE MaxNumberOfConnections,100,Toy-ConTypeLeft1,Toy-ConTypeRight1[,ConnectionDialogFlag ]
XCTRLSTYLE MaxNumberOfConnections,100,Toy-ConTypeLeft1,Toy-ConTypeRight1,Toy-ConTypeLeft2,Toy-ConTypeRight2[,ConnectionDialogFlag ]
Configure Toy-Con connection settings
XSCREEN Width,Height[,SampleMagnification[,CompositeMode[,AspectRatio]]]
Set the display resolution
XSCREEN OUT Width,Height [,SampleMagnification[,CompositeMode[,AspectRatio]]]
Get display resolution
XSUBSCREEN DisplayOffsetX,DisplayOffsetY,Width,Height
Specify the display size of the subprogram display
XSUBSCREEN 0
Stop displaying the subprogram screen
XSUBSCREEN OUT DisplayOffsetX,DisplayOffsetY,Width,Height
Get the display offset of the subprogram display
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
|