Statement and function name | Type |
Format:
Abbreviation:
Argument:
Returns:
Function:
→
Use cases:
Standard function |
Written expressions: | abs(n) |
Argument: | float |
Return value: | float |
Function: | Returns the absolute value of a number n. |
Use cases: |
GRAPH.FNC |
Written expressions: | apage(pa) |
Argument: | char |
Returns: | void |
Function: | Specifies the active page pa of the graphic screen (active page to read and write in the graphics screen). |
Page number can be 0-3, the maximum value depends on the actual screen size and color mode of the graphics screen. | |
The range of values of the active page pa with actual screen size and color mode of the graphics screen: | |
1024 × 1024 (16-color mode) ... 0 512 × 512 (16-color mode) ... 0-3 512 × 512 (256-color mode) ... 0,1 512 × 512 (65536-color mode) ... 0 |
|
→ | home , screen , Vpage , window |
Use cases: |
Standard function |
Written expressions: | asc(st) |
Argument: | str |
Return value: | int |
Function: | Returns the character code of the first character of the string st. |
st will return 0 if the character is null. | |
Refer to the “character code table” for the correspondence between characters and character codes. | |
→ | CHR $ , “character code table” |
Use cases: |
Standard function |
Written formula: | atan(n) |
Argument: | float |
Return value: | float |
Function: | Returns the inverse tangent of the numerical value n (arc tangent). |
Returns the value from -π / 2 to π / 2. | |
Use cases: |
Standard function |
Written expressions: | atof(st) |
Argument: | str |
Return value: | float |
Function: | Converts the string st to float type number. st is a sequence of characters (+、-、0~9、.、e、E) that can be converted to a float type number. The conversion is not performed if there is a character for which the float value can not be determined. |
The space or tab characters of st at the beginning will be ignored. In addition, there must be at least one or more digits before and after the decimal point. In addition, it must have at least one or more digits behind the e or E for exponential representation. | |
st can not be null character. | |
The following format of st string can not be converted: | |
[Whitespace] [sign] [.digits] [e or E [sign] digits] | |
Example: | st=“-2.51235e-2” |
→ | ECVT , fcvt , gcvt |
whitespace | Space or tab characters are ignored. |
sign | “+” or “-” |
digits | Decimal numbers which consist of 1 or more, and don't have anything in front of the decimal point, require at least one number behind the decimal point. |
index | Index consists of “e” or “E” and decimal numbers with a sign. |
Standard function |
Written expressions: | atoi(st) |
Argument: | str |
Return value: | int |
Function: | Converts st string to int type number. st is a sequence of characters that can be converted (0~9, +, -) to int type number. The conversion is aborted if there is a character for which the int type value can not be determined. |
Space or tab characters at the begining of st will be ignored. st also requires at least one or more digits. | |
st can not be null character. | |
st string of the following format can be converted: | |
[whitespace] [sign] digits | |
→ | itoa |
whitespace | Space or tab characters are ignored. |
sign | “+” or “-” |
digits | One or more decimal digits. |
Command |
Written expressions: | auto [line number] [incremental] |
Abbreviation: | a. |
Function: | Automatically genetares line number at the beginning of each program line. |
You can omit the incremental switch but in that case lines will automatically increment by 10 | |
If a line number overlaps with existing line, the contents of the line will be displayed. In this case you can press return key without typing anything and it will not change the contents of the line. | |
Press BREAK key (or CTRL+C) to release the auto function. The current program line will not be saved. |
For example: | |
auto | line numbers will begin with 10, 20, 30 (the same as auto 10,10) |
auto 100 | line numbers will begin with 100, 110, 120 |
auto ,5 | line numbers will begin with 10, 15, 20 |
AUDIO.FNC |
Written expressions: | a_play(na,sf,md[,lng]) |
Argument: | Numeric one-dimensional array name (na),char(sf,md,lng) |
Return value: | void |
Function: | Plays PCM data of specified na array. |
na … Number of one-dimensional array name that contains the PCM data. | |
sf … sampling frequency | |
0 ... 3.9KHz 1 ... 5.2KHz 2 ... 7.8KHz 3 ... 10.4KHz 4 ... 15.6KHz |
|
As a general rule, use the same sampling frequency sf for playback and when recording with a_rec function, if you want to play music. The sound will not play normally if other frequencies are used. | |
md … audio output mode (audio signal output mode from the audio output terminal of the computer) | |
0 ... silence 1 ... left channel 2 ... right channel 3 ... stereo output |
|
lng … length from 0 index of na array to play | |
Values that can be used as lng are from 1 to subscript+1 of the declared na array. | |
All PCM data will be played if lng is omitted. | |
Use cases: |