Differences

This shows you the differences between two versions of the page.

Link to this comparison view

x68000:x-basic [2014/12/14 01:48]
eidis [ABS]
x68000:x-basic [2019/08/27 20:45]
Line 1: Line 1:
-====== X-BASIC Reference Manual ====== 
- 
-  * All info taken from: http://​ww3.enjoy.ne.jp/​~zoomark/​ip/​ip_menu.html 
-  * Each instruction and function of BASIC, is described in the following format. 
- 
-|**Statement and function name**|**Type**| 
- 
-**Format:** 
-  *It is the writing of commands and functions. 
-  *Items that are highlighted in <color red>​**red bold**</​color>​ are data and arguments that are required. 
-  *Items enclosed in [] are optional. 
-  *... is repetition of similar. It represents input of data and arguments. 
-  *(Symbols such as (), {}, [] are reserved words) other characters must be entered exactly as shown. 
-  *As a general rule, please put space between the instruction and data name for command or statement. In addition, please do not put space between the left parenthesis enclosing the function name and arguments. 
- 
-**Abbreviation:​** 
-  *It is the writing of commands and functions that can be omitted. ​ It should be noted that arguments, brackets, etc. can not be omitted. 
- 
-**Argument:​** 
-  *Represents what type of argument a function needs as a general rule. 
-  *There are four data types. Functions that require more than one type of argument are summarized in parentheses according to each data type. 
-    *int, char, float (numeric type) 
-    *str (character type)  
-  *Anything valid is referred to as numeric type as long as it is a numeric type. 
-  *In addition, in special cases (in the case of array the dimension must also be stated) the argument variable must be stated as name or array (not constant, expression, etc. and arguments). 
- 
-**Returns:​** 
-  *The type of the written return value for all functions. ​ 
-  *int, char, float, str have no return values (including the case where the return value does not exist). 
- 
-<color red>​**Function:​**</​color>​ 
-  *Explains the meaning of arguments and the function of each instruction and function. 
- 
-**→** 
-  *Related instructions and syntax references. 
- 
-**Use cases:** 
-  *Simple sample programs and examples. 
- 
-====== ABS ====== 
- 
-|**Standard function**| 
- 
-|  **Written expressions:​**|abs(<​color red>​**n**</​color>​) | 
-|  **Argument:​**|float | 
-|  **Return value:​**|float | 
-|  <color red>​**Function:​**</​color>​| Returns the absolute value of a number <color red>​**n.**</​color>​ | 
-|  **Use cases:**| | 
- 
-====== APAGE ====== 
- 
-|**GRAPH.FNC**| 
- 
-|  **Written expressions:​**|apage(<​color red>​**pa**</​color>​) | 
-|  **Argument:​**|char | 
-|  **Returns:​**|void | 
-|  <color red>​**Function:​**</​color>​|Specifies the active page <color red>​**pa**</​color>​ 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 <color red>​**pa**</​color>​ with actual screen size and color mode of the graphics screen: | 
-| |<​file>​ 
-    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 
-   </​file>​| 
-|  **→**|home , screen , Vpage , window| 
-|  **Use cases:**| 
- 
-====== ASC ====== 
- 
-|**Standard function**| 
- 
-|  **Written expressions:​**|asc(<​color red>​**st**</​color>​) | 
-|  **Argument:​**|str | 
-|  **Return value:​**|int | 
-|  <color red>​**Function:​**</​color>​|Returns the character code of the first character of the string <color red>​**st**</​color>​. | 
-| |<color red>​**st**</​color>​ 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:**| | 
- 
-====== ATAN ====== 
- 
-|**Standard function**| 
- 
-|  **Written formula:​**|atan(<​color red>​**n**</​color>​) | 
-|  **Argument:​**|float | 
-|  **Return value:​**|float | 
-|  <color red>​**Function:​**</​color>​|Returns the inverse tangent of the numerical value <color red>​**n**</​color>​ (arc tangent). | 
-| |Returns the value from -π / 2 to π / 2. | 
-|  **Use cases:**| |  
- 
-====== ATOF ====== 
- 
-|**Standard function**| 
- 
-|  **Written expressions:​**|atof(<​color red>​**st**</​color>​) | 
-|  **Argument:​**|str | 
-|  **Return value:​**|float | 
-|  <color red>​**Function:​**</​color>​|Converts the string <color red>​**st**</​color>​ to float type number. <color red>​**st**</​color>​ 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 <color red>​**st**</​color>​ 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. | 
-| |<color red>​**st**</​color>​ can not be null character. | 
-| |The following format of <color red>​**st**</​color>​ string can not be converted: | 
-| |**[**<​color red>​**Whitespace**</​color>​**]** **[**<​color red>​**sign**</​color>​**]** **[**<​color red>​**.digits**</​color>​**]** **[**<​color red>**e or E**</​color>​ **[**<​color red>​**sign**</​color>​**]** <color red>​**digits**</​color>​**]** | 
-|  **Example:​**|st="​-2.51235e-2"​ | 
-|  **→**|ECVT , fcvt , gcvt | 
- 
-|<color red>​**whitespace**</​color>​ |Space or tab characters are ignored. | 
-|<color red>​**sign**</​color>​ |"​+"​ or "​-"​ | 
-|<color red>​**digits**</​color>​ |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 "<​color red>​**e**</​color>"​ or "<​color red>​**E**</​color>"​ and decimal numbers with a sign. | 
- 
-====== ATOI ====== 
- 
-|**Standard function**| 
- 
-|  **Written expressions:​**|atoi(<​color red>​**st**</​color>​) | 
-|  **Argument:​**|str | 
-|  **Return value:​**|int | 
-|  <color red>​**Function:​**</​color>​|Converts the <color red>​**st**</​color>​ string to int type number. <color red>​**st**</​color>​ 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 <color red>​**st**</​color>​ will be ignored. <color red>​**st**</​color>​ also requires at least one or more digits. | 
-| |<color red>​**st**</​color>​ can not be null character. | 
-| |<color red>​**st**</​color>​ string of the following format can be converted: | 
-| |**[**<​color red>​**whitespace**</​color>​**] [**<​color red>​**sign**</​color>​**] **<color red>​**digits**</​color>​ | 
-|  **→**|itoa | 
- 
-|<color red>​**whitespace**</​color>​ |Space or tab characters are ignored. | 
-|<color red>​**sign**</​color>​ |"​+"​ or "​-"​ | 
-|<color red>​**digits**</​color>​ |One or more decimal digits. | 
- 
-====== AUTO ====== 
- 
-|**Command**| 
- 
-|  **Written expressions:​**|auto **[**<​color red>​**line number**</​color>​**] [**<​color red>​**incremental**</​color>​**]** | 
-|  **Abbreviation:​**|a. | 
-|  <color red>​**Function:​**</​color>​|Automatically genetares <color red>​**line number**</​color>​ at the beginning of each program line. | 
-| |You can omit the <color red>​**incremental switch**</​color>​ 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 | 
- 
-====== A_PLAY ====== 
- 
-|**AUDIO.FNC**| 
- 
-|  **Written expressions:​**|a_play(<​color red>​**na**</​color>,<​color red>​**sf**</​color>,<​color red>​**md**</​color>​**[**,<​color red>​**lng**</​color>​**]**) | 
-|  **Argument:​**|Numeric one-dimensional array name (<color red>​**na**</​color>​),​char(<​color red>​**sf**</​color>,<​color red>​**md**</​color>,<​color red>​**lng**</​color>​) | 
-|  **Return value:​**|void | 
-|  <color red>​**Function:​**</​color>​|Plays PCM data of specified <color red>​**na**</​color>​ array. | 
-| |na ... Number of one-dimensional array name that contains the PCM data. | 
-| |sf ... sampling frequency | 
-| |<​file>​ 
-0 ... 3.9KHz 
-1 ... 5.2KHz 
-2 ... 7.8KHz 
-3 ... 10.4KHz 
-4 ... 15.6KHz 
-</​file>​ | 
-| |As a general rule, use the same sampling frequency <color red>​**sf**</​color>​ 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) | 
-| |<​file>​ 
-0 ... silence 
-1 ... left channel 
-2 ... right channel 
-3 ... stereo output 
-</​file>​ | 
-| |lng ... length from 0 index of na array to play | 
-| |Values that can be used as <color red>​**lng**</​color>​ are from 1 to subscript+1 of the declared <color red>​**na**</​color>​ array. | 
-| |All PCM data will be played if <color red>​**lng**</​color>​ is omitted. | 
-|  **Use cases:**| | 
  
 
 x68000/x-basic.txt · Last modified: 2019/08/27 20:45 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Driven by DokuWiki