The following table
briefly describes every XBasic data-type.
The following table
briefly describes every XBasic scope.
The following table
briefly describes every XBasic keyword.
The following table
briefly describes every XBasic keyword.
This table is a very
valuable resource, so everyone is encouraged to help enhance and extend it.
Eventually every keyword should hyperlink to a detailed description of the keyword,
including examples.
|
kind |
keyword |
comment |
|
|
|
|
|
i |
ABS() |
absolute value of number |
|
m |
ACOS() |
arc-cosine |
|
m |
ACOSH() |
arc-hyperbolic-cosine |
|
m |
ACOT() |
arc-cotangent |
|
m |
ACOTH() |
arc-hyperbolic-cotangent |
|
m |
ACSC() |
arc-cosecant |
|
m |
ACSCH() |
arc-hyperbolic-cosecant |
|
s |
ALL |
execute all matching cases in SELECT CASE blocks |
|
o |
AND |
bitwise AND operator |
|
i |
ASC() |
numeric value of character in string |
|
m |
ASEC() |
arc-secant |
|
m |
ASECH() |
arc-hyperbolic-secant |
|
m |
ASIN() |
arc-sine |
|
m |
ASINH() |
arc-hyperbolic-sine |
|
m |
ATAN() |
arc-tangent |
|
m |
ATANH() |
arc-hyperbolic-tangent |
|
s |
ATTACH |
attach array/subarray/string to another |
|
s |
AUTO |
scope - automatic and local - maybe in CPU register |
|
s |
AUTOX |
scope - automatic and local - not in CPU register |
|
|
|
|
|
i |
BIN$() |
create binary format string |
|
i |
BINB$() |
create binary format string with leading 0b |
|
i |
BITFIELD() |
define bitfield constant or variable |
|
|
|
|
|
s |
CASE |
one case in SELECT CASE block |
|
s |
CFUNCTION |
declare/define C-protocol function |
|
i |
CHR$() |
string of characters of an integer value |
|
i |
CJUST$() |
center string in field of space characters |
|
s |
CLEAR |
not implemented |
|
i |
CLOSE() |
close and open file |
|
i |
CLR() |
clear bitfield in integer |
|
m |
COS() |
cosine |
|
m |
COSH() |
hyperbolic-cosine |
|
m |
COT() |
cotangent |
|
m |
COTH() |
hyperbolic-cotangent |
|
m |
CSC() |
cosecant |
|
m |
CSCH() |
hyperbolic-cosecant |
|
i |
CSIZE() |
number of characters in string before first 0x00 |
|
i |
CSIZE$() |
string of characters up to first 0x00 |
|
i |
CSTRING$() |
convert C string to XBasic string |
|
|
|
|
|
s |
DCOMPLEX |
data-type : complex number with DOUBLE elements |
|
s |
DEC |
decrement by 1 |
|
s |
DECLARE |
declare function |
|
i |
DHIGH() |
extract high 32-bits from 64-bit DOUBLE |
|
s |
DIM |
dimension an array and zero its contents |
|
i |
DLOW() |
extract low 32-bits from 64-bit DOUBLE |
|
i |
DMAKE() |
make 64-bit DOUBLE from two 32-bit integers |
|
s |
DO |
begin a DO ... LOOP block |
|
s |
DOUBLE |
data-type : ieee 64-bit floating point |
|
i |
DOUBLE() |
convert value to DOUBLE data-type |
|
i |
DOUBLEAT() |
read DOUBLE value from memory |
|
i |
DOUBLEAT() |
write DOUBLE value to memory |
|
|
|
|
|
s |
ELSE |
begin alternate block in IF ... THEN ... ELSE ... ENDIF block |
|
s |
END |
END of - program, function, block-structure |
|
s |
ENDIF |
END of multi-line IF block |
|
i |
EOF() |
is file-pointer at or beyond the end of an open file |
|
i |
ERROR() |
return previous error and optionally set new error value |
|
i |
ERROR$() |
return error string given an error number |
|
s |
EXIT |
exit a block structure - DO, WHILE, FOR, IF, SELECT CASE |
|
m |
EXP() |
exponential - e to the x power |
|
m |
EXP10() |
exponential - 10 to the x power |
|
s |
EXPORT |
put declared functions and constants in .DEC file |
|
s |
EXTERNAL |
scope - share with statically linked modules |
|
i |
EXTS() |
extract signed bitfield from integer |
|
i |
EXTU() |
extract unsigned bitfield from integer |
|
|
|
|
|
s |
FALSE |
in SELECT CASE - means zero or empty |
|
i |
FIX() |
integer value, round toward zero |
|
s |
FOR |
begin FOR ... NEXT loop |
|
i |
FORMAT$() |
create a formatted string |
|
s |
FUNCADDR |
data-type - function address |
|
i |
FUNCADDR() |
convert value to FUNCADDR data-type |
|
i |
FUNCADDRESS() |
address of a function |
|
s |
FUNCTION |
function declaration or definition |
|
|
|
|
|
i |
GHIGH() |
extract high 32-bits from GIANT value |
|
s |
GIANT |
data-type - 64-bit signed integer |
|
i |
GIANT() |
convert value to GIANT data-type |
|
i |
GIANTAT() |
read GIANT value from memory |
|
i |
GIANTAT() |
write GIANT value to memory |
|
i |
GLOW() |
extract low 32-bits from GIANT value |
|
i |
GMAKE() |
create 64-bit GIANT value from low & high 32-bit integers |
|
s |
GOADDR |
data-type - address of GOTO label |
|
i |
GOADDR() |
convert value to GOADDR data-type |
|
i |
GOADDRESS() |
address of GOTO label |
|
s |
GOSUB |
call a local subroutine |
|
s |
GOTO |
jump to a local label |
|
|
|
|
|
i |
HEX$() |
create hexadecimal format string |
|
i |
HEXX$() |
create hexadecimal format string with leading 0x |
|
i |
HIGH0() |
find most-significant 0 bit |
|
i |
HIGH1() |
find most-significant 1 bit |
|
|
|
|
|
s |
IF |
begin IF statement or IF block - if non-zero or non-empty |
|
s |
IFF |
begin IF statement or IF block - if zero or empty |
|
s |
IFT |
begin IF statement or IF block - if non-zero or non-empty |
|
s |
IFZ |
begin IF statement or IF block - if zero or empty |
|
s |
IMPORT |
read and process a .DEC declaration file |
|
s |
INC |
increment by 1 |
|
i |
INCHR() |
find first character in string that matches one of a set |
|
i |
INCHRI() |
same as INCHR( ) except case insensitive |
|
i |
INFILE$() |
input string from an open file |
|
i |
INLINE$() |
input string from console |
|
i |
INSTR() |
find a string within another string |
|
i |
INSTRI() |
same as INSTR( ) except case insensitive |
|
i |
INT() |
integer value, round to nearest integer |
|
s |
INTERNAL |
declare function visible only within this program |
|
|
|
|
|
i |
LCASE$() |
convert string to lower case |
|
i |
LCLIP$() |
clip characters from left end of string |
|
i |
LEFT$() |
get characters from left end of string |
|
i |
LEN() |
length of string or array = # of elements |
|
s |
LIBRARY |
name this function library |
|
i |
LIBRARY$() |
name of this function library |
|
i |
LJUST$() |
left justify string in field of space characters |
|
i |
LOF() |
length of open file |
|
m |
LOG() |
natural logarithm |
|
m |
LOG10() |
base 10 logarithm |
|
s |
LOOP |
end DO ... LOOP block |
|
i |
LTRIM$() |
trim whitespace from left end of string |
|
|
|
|
|
i |
MAKE() |
make a bitfield |
|
i |
MAX() |
maximum of two values |
|
i |
MID$() |
extract any portion of string |
|
i |
MIN() |
minimum of two values |
|
o |
MOD |
modulus = remainder from division |
|
|
|
|
|
s |
NEXT |
end of FOR ... NEXT block |
|
o |
NOT |
operator - bitwise NOT = invert all bits |
|
i |
NULL$() |
create string of 0x00 null characters |
|
|
|
|
|
i |
OCT$() |
octal format string |
|
i |
OCTO$() |
octal format string with leading 0o |
|
i |
OPEN() |
open a file |
|
o |
OR |
operator - bitwise OR |
|
|
|
|
|
i |
POF() |
position of file-pointer in open file |
|
s |
PRINT |
print to console or open file |
|
s |
PROGRAM |
name this program |
|
i |
PROGRAM$() |
name of this program |
|
|
|
|
|
s |
QUIT |
terminate program execution |
|
|
|
|
|
i |
RCLIP$() |
clip characters from right end of string |
|
s |
READ |
read from file into variables |
|
s |
REDIM |
redimension array, preserve contents |
|
s |
RETURN |
return from function |
|
i |
RIGHT$() |
get characters from right end of string |
|
i |
RINCHR() |
reverse direction INCHR( ) |
|
i |
RINCHRI() |
reverse direction INCHRI( ) |
|
i |
RINSTR() |
reverse direction INSTR( ) |
|
i |
RINSTRI() |
reverse direction INSTRI( ) |
|
i |
RJUST$() |
right justify string in field of spaces |
|
i |
ROTATEL() |
circular rotate bits to the left |
|
i |
ROTATER() |
circular rotate bits to the right |
|
i |
RTRIM$() |
trim whitespace character from right end of string |
|
|
|
|
|
s |
SBYTE |
data-type - signed 8-bit integer |
|
i |
SBYTE() |
convert to SBYTE data-type |
|
i |
SBYTEAT() |
read SBYTE value from memory |
|
i |
SBYTEAT() |
write SBYTE value to memory |
|
s |
SCOMPLEX |
data-type - complex number with SINGLE elements |
|
m |
SEC() |
secant |
|
m |
SECH() |
hyperbolic-secant |
|
i |
SEEK() |
move file-pointer in open file |
|
s |
SELECT |
begin SELECT CASE block |
|
i |
SET() |
set a range of bits |
|
s |
SFUNCTION |
declare or define operating-system protocol function |
|
i |
SGN() |
sign of number : -1, 0, +1 |
|
s |
SHARED |
scope - shared within program |
|
i |
SHELL() |
execute command line string |
|
i |
SIGN() |
sign of number : -1, +1 |
|
i |
SIGNED$() |
convert to STRING data-type, leading "-" or "+"
sign |
|
m |
SIN() |
sine |
|
m |
SINH() |
hyperbolic-sine |
|
s |
SINGLE |
data-type - ieee 32-bit floating point |
|
i |
SINGLE() |
convert to SINGLE data-type |
|
i |
SINGLEAT() |
read SINGLE value from memory |
|
i |
SINGLEAT() |
write SINGLE value to memory |
|
i |
SIZE() |
size of string or array in bytes |
|
s |
SLONG |
data-type - signed 32-bit integer |
|
i |
SLONG() |
convert to SLONG data-type |
|
i |
SLONGAT() |
read SLONG value from memory |
|
i |
SLONGAT() |
write SLONG value to memory |
|
i |
SMAKE() |
make SINGLE value the bit image of a 32-bit integer |
|
i |
SPACE$() |
create string of space characters |
|
m |
SQRT() |
square-root |
|
s |
SSHORT |
data-type - signed 16-bit integer |
|
i |
SSHORT() |
convert to SSHORT data-type |
|
i |
SSHORTAT() |
read SSHORT value from memory |
|
i |
SSHORTAT() |
write SSHORT value to memory |
|
s |
STATIC |
scope - permanent and local to function |
|
s |
STEP |
optional size of increment in FOR ... NEXT loops |
|
s |
STOP |
stop program execution here |
|
i |
STR$() |
convert to STRING data-type, leading "-" or " " |
|
s |
STRING |
data-type - string of characters |
|
i |
STRING() |
convert to STRING data-type, leading "-" |
|
i |
STRING$() |
convert to STRING data-type, leading "-" |
|
i |
STUFF$() |
stuff string into another string |
|
s |
SUB |
begin a subroutine |
|
s |
SUBADDR |
data-type - address of subroutine |
|
i |
SUBADDR() |
convert to SUBADDR data-type |
|
i |
SUBADDRESS() |
address of subroutine |
|
s |
SWAP |
swap contents of two same-type variables or arrays |
|
|
|
|
|
i |
TAB() |
append space characters to PRINT string |
|
m |
TAN() |
secant |
|
m |
TANH() |
hyperbolic-secant |
|
s |
THEN |
begin statement in IF ... THEN block |
|
s |
TO |
limit in FOR statement |
|
i |
TRIM$() |
trim whitespace from both ends of string |
|
s |
TRUE |
in SELECT CASE - means non-zero or non-empty |
|
s |
TYPE |
begin user-defined data-type AKA composite data-type |
|
i |
TYPE() |
return data-type of variable, array, component |
|
|
|
|
|
i |
UBOUND() |
upper bound of string or array or subarray |
|
s |
UBYTE |
data-type - unsigned 8-bit integer |
|
i |
UBYTE() |
convert to UBYTE data-type |
|
i |
UBYTEAT() |
read UBYTE from memory |
|
i |
UBYTEAT() |
write UBYTE to memory |
|
i |
UCASE$() |
convert string to upper case |
|
s |
ULONG |
data-type - unsigned 32-bit integer |
|
i |
ULONG() |
convert to ULONG data-type |
|
i |
ULONGAT() |
read ULONG from memory |
|
i |
ULONGAT() |
write ULONG to memory |
|
s |
UNION |
begin component overlay in TYPE block |
|
s |
UNTIL |
loop condition test in DO and LOOP statements |
|
s |
USHORT |
data-type - unsigned 16-bit integer |
|
i |
USHORT() |
convert to USHORT data-type |
|
i |
USHORTAT() |
read USHORT from memory |
|
i |
USHORTAT() |
write USHORT to memory |
|
|
|
|
|
s |
VERSION |
assign version number to program or library |
|
i |
VERSION$() |
version number of program or library |
|
s |
VOID |
function returns no value |
|
|
|
|
|
s |
WHILE |
loop condition test in DO and LOOP statements |
|
s |
WRITE |
write variables to open file |
|
|
|
|
|
s |
XLONG |
data-type - cpu register/address size integer |
|
i |
XLONG() |
convert to XLONG data-type |
|
i |
XLONGAT() |
read XLONG from memory |
|
i |
XLONGAT() |
write XLONG to memory |
|
i |
XMAKE() |
retype to XLONG from any data-type |
|
o |
XOR |
operator - bitwise exclusive-or |
|
|
|
|