-
-
Notifications
You must be signed in to change notification settings - Fork 7
Language guide
- Working with programs
- Control flow
- Arrays and variables
- Type conversion
- String operations
- Text and the screen
- The printer
- Keyboard input
- Function-key macros
- Calculations and maths
- Devices and files
- Graphics
- Sound
- Joystick and mouse
- Disks and DOS
- Serial communications
- Event handling
- Error handling
- User-defined functions
- Date and time
- Including data in a program
- Memory and machine ports
- Features not yet implemented
- Unsupported features
This documentation describes the SE Basic IV language, which aims to support programs written for Microsoft BASIC with minimal changes.
The Language Guide covers the language topic by topic, thematically grouping language elements used for a related purpose. Refer to the Language reference for a formal description of the language elements and their syntax.
Statement | Description |
---|---|
AUTO | Enter automatic line numbering mode |
CHAIN | Load a new program and run it, preserving common variables |
DELETE | Delete lines from the program |
EDIT | Print a program line to the screen for editing |
LIST | Print program lines to the screen |
LOAD | Read a new program from file |
MERGE | Overlay a program file onto the current program |
NEW | Clear the current program from memory |
RENUM | Replace the program's line numbers |
RUN | Start the current program |
SAVE | Store the current program to file |
TRON | Enable line number tracing |
TROFF | Disable line number tracing |
Statement | Description |
---|---|
CONT | Continue interrupted program |
ELSE | Ignore the remainder of the line (standalone ELSE) |
END | Stop execution of the program |
FOR | Start a for-loop |
GOSUB | Call a subroutine |
GOTO | Jump to another location in the program |
IF | Branch on a condition |
NEXT | Iterate a for-loop |
ON | Calculated jump or subroutine call |
RETURN | Return from subroutine |
STOP | Interrupt program execution |
WEND | Iterate a while-loop |
WHILE | Enter a while-loop |
Statement | Description |
---|---|
DIM | Allocate an array |
ERASE | Deallocate an array |
SWAP | Swap two variables |
Function | Description |
---|---|
ASC | Character to ordinal value |
CHR$ | Ordinal value to character |
HEX$ | Integer to hexadecimal string representation |
OCT$ | Integer to octal string representation |
STR$ | Numeric value to decimal string representation |
VAL | String representation to numeric value |
Function | Description |
---|---|
LEN | String length |
Statement | Description |
---|---|
CLS | Clear the screen |
COLOR | Set colour and palette values |
LOCATE | Set the position and shape of the text screen cursor |
PALETTE | Assign a colour to an attribute |
PALETTE USING | Assign an array of colours to attributes |
Print expressions to the screen |
Function | Description |
---|---|
SCREEN | Character or attribute at given location |
Statement | Description |
---|---|
PRINT # | Print expressions to the printer |
Statement | Description |
---|---|
INPUT | Retrieve user input on the console |
LINE INPUT | Retrieve a line of user input on the console |
Function | Description |
---|---|
INKEY$ | Nonblocking read from keyboard |
INPUT$ | Blocking read from keyboard |
Statement | Description |
---|---|
KEY | Define a function-key macro |
Function | Description |
---|---|
ABS | Absolute value |
ATAN | Arctangent |
ACOS | Arccosine |
ASIN | Arcsine |
COS | Cosine |
EXP | Exponential |
FIX | Truncation |
INT | Floor |
LOG | Natural logarithm |
SIN | Sine |
SGN | Sign |
SQR | Square root |
TAN | Tangent |
Statement | Description |
---|---|
RANDOMIZE | Seed the random number generator |
Function | Description |
---|---|
RND | Pseudorandom number |
SE Basic IV handles devices differently than Microsoft BASIC. A device is connected to a specific channel and one or more I/O streams can be connected to that channel. For example, the display is connected to channel S
and by default stream #2
is connected to that channel S
.
In SE Basic IV, the DOS is integrated into BASIC and there is no SHELL
command.
Statement | Description |
---|---|
CHDIR |
Change current directory. |
COPY |
Make a copy of a file. |
FILES |
List the files in the current directory. |
KILL |
Delete a file on a disk device. |
MKDIR |
Create a new directory. |
NAME |
Rename a file on disk. |
RMDIR |
Remove a directory. |
This documentation is copyright © 2012-2022 Source Solutions, Inc. Portions copyright © 2014-2019 Rob Hagemans.
Licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.