QBASIC - Functions
ABS, ASC, ATN, CDBL, CHR$, CINT, CLNG, COS, CSNG, CSRLIN, CVD, CVDMBF, CVI, CVL, CVS, CVSMBF, DATE$, ENVIRON$, EOF, ERDEV, ERDEV$, ERL, ERR, EXP, FILEATTR, FIX, FRE, FREEFILE, HEX$, INKEY$, INP, INPUT$, INSTR, INT, IOCTL$, LBOUND, LCASE$, LEFT$, LEN, LOC, LOF, LOG, LPOS, LTRIM$, MID$, MKDMBF$, MKI$, MKL$, MKS$, MKSMBF$, OCT$, PEEK, PEN, PLAY, PMAP, POINT, POS, RIGHT$, RND, RTRIM$, SADD, SCREEN, SEEK, SETMEM, SGN, SIN, SPACE$, SPC, SQR, STICK, STR$, STRIG, STRING$, TAB, TAN, TIME$, TIMER, UBOUND, UCASE$, VAL, VARPTR, VARPTR$, VARSEG
String
INSTR
LCASE$
UCASE$
LEFT$
MID$
RIGHT$
LEN
LTRIM$
RTRIM$
SPACE$
STRING$

 

Conversion

Numeric
CDBL
CINT
CLNG
CSNG
CVD
CVI
CVL
CVS
CVDMBF
CVSMBF
    
Number > String
CHR$
HEX$
OCT$
STR$
MKD$
MKI$
MKL$
MKS$
MKDMBF$
MKSMBF$
String > Number
ASC
VAL
 
Mathematical
ABS
ATN
COS
EXP
FIX
INT
LOG
RND
SGN
SIN
SQR
TAN
Array
LBOUND
UBOUND
Input
INKEY$
INP
INPUT$
PEN
STICK
STRIG
Print
LPOS
SPC
TAB
Screen
CSRLIN
POS
SCREEN
Graphics
PMAP
POINT
Sound
PLAY
File
EOF
LOC
LOF
Error
ERDEV
ERDEV$
ERR
ERL
System
ENVIRON$
FRE
PEEK
POKE
IOCTL$
SETMEM
SADD
VARPTR
VARPTR$
VARSEG
Time
DATE$
TIME$
TIMER
 
ENVIRON$()
EOF()
ERDEV()
Returns an error code from the last device that generated a critical error.
The low byte of the value returned by ERDEV contains the DOS error code. The high byte contains device-attribute information.
ERDEV$()
Returns the name of the device that generated the error.
ERL()
ERR()
FILEATTR()
FRE()
Returns the amount (in bytes) of available or unused memory.
>SETMEM
FRE(numeric-expression)
FRE(stringexpression$)
numeric-expression   A value that specifies the type of memory FRE returns:
-1 The size of the largest array (nonstring) you can create
-2 The unused stack space
Any other number The available string space
stringexpression$
Any string expression FRE compacts the free string space into a single block, then returns the amount of available string space.
 
PRINT "Array Space", FRE(-1)
PRINT "Unused Stack Space", FRE(-2)
PRINT "String Space", FRE("")

PRINT "Far Heap", SETMEM(0)
Array Space        159708
Unused Stack Space 1050
String Space       31196

Far Heap           163824
 
FREEFILE
 
IOCTL$()
LBOUND()
LOC
LOF
LPOS
PEEK(n)
>DEF SEG, POKE
 
PEN
PLAY
PMAP
POINT
POS
SCREEN()
SETMEM()
Changes the amount of memory used by the far heap (where arrays are stored) and returns information about the far heap.
>FRE
SETMEM(numeric-expression&)
numeric-expression&  

Specifies the number of bytes by which the far heap will increase or decrease; in addition, specifies the return value of the function:

Numeric
Expression
  Far Heap   Return Value
Negative
0
Positive
  Decrease
No change
Increase
  Maximum size of far heap
Current size of far heap
Maximum size of far heap
 
PRINT SETMEM(0)      '163824
PRINT SETMEM(-1024)  '162800
 
SEEK
STICK
STRIG
SPC()
>PRINT SPC()
TAB()
>PRINT TAB()
UBOUND