Module __Chapter_3

Source
Expand description

§Functions

Functions convert various inputs to an output value. Most functions convert a value to a value but some get their input from the operating system. For example, TIME$ gets the local system time. You might be wondering why TIME$ is a function and not a variable. You can use TIME$() if you prefer.

Modules§

ABS
ABS(X) Returns the absolute value of X.
ASC
ASC(X$) Returns the unicode value of the first character of X.
ATN
ATN(X) Returns the arctangent of X.
CDBL
CDBL(X) Returns X as a Double.
CHR
CHR$(X) Returns a character of ASCII X.
CINT
CINT(X) Returns X as an Integer. Overflow error may occur.
COS
COS(X) Returns the cosine of X in radians.
CSNG
CSNG(X) Returns X as a Single.
DATE
DATE$ Returns the system date.
EXP
EXP(X) Returns e to the power of X.
FIX
FIX(X) Returns the truncated integer value of X.
HEX
HEX$(X) Returns hexadecimal string of integer X.
INKEY
INKEY$ Returns a single key press, empty string if none.
INSTR
INSTR([I],X$,Y$) Returns position of Y$ in X$.
INT
INT(X) Returns the largest integer <= X.
LEFT
LEFT$(A$,X) Returns the leftmost X characters of A$.
LEN
LEN(X$) Returns the number of characters in X$.
LOG
LOG(X) Returns the natural logarithm of X.
MID
MID$(A$,X,[Y]) Returns a portion of A$.
OCT
OCT$(X) Returns octal string of integer X.
POS
POS(X) Returns the horizontal cursor position of the terminal.
RIGHT
RIGHT$(A$,X) Returns the rightmost X characters of A$.
RND
RND(X) Returns a pseudo-random number.
SGN
SGN(X) Returns the sign of X.
SIN
SIN(X) Returns the sine of X in radians.
SPC
SPC(X) Returns a string of X spaces.
SQR
SQR(X) Returns the square root of X.
STR
STR$(X) Returns the number X as a string.
STRING
STRING$(X, <Y|Y$>) Returns X copies of Y as a string.
TAB
TAB(X) Returns a string of spaces.
TAN
TAN(X) Returns the tangent of X in radians.
TIME
TIME$ Returns the system time.
VAL
VAL(X$) Returns a number parsed from string X$.