System Functions

Function

Description

.ARGTYP

Returns the type of the specified argument passed to the current SBX, function, or procedure.

.ARGSIZ

Returns the size of the specified argument passed to the current SBX, function, or procedure.

DATE

Returns system date in separated format. See "Separated Date Format" below, also ODTIM().

ERR

ERR(X) is used within an error trap to return information relating to a BASIC error that has occurred, based on X.

ERRMSG

ERRMSG(X) returns the message associated with BASIC error X, based on contents of sys:errmsg.xxx. This is an A-Shell extension, requires COMPIL /X:2.

.EXTENT

.EXTENT(ARY(){,SUBNO}) returns the "extent" of the subscript number SUBNO (default 1) in the array ARY().

.INSTRR

Searches a string for a pattern, like INSTR(), but in reverse.

MEM

MEM(X) returns information about available memory and resources. See MEM(X) table below.

TIME

Returns system time in number of seconds since midnight. See ODTIM.SBR for formatting.

 

Separated Date Format

MAP1 SDATE

    MAP2 MON,B,1            ! month 1-12

    MAP2 DAY,B,1            ! day 1-31

    MAP2 YR,B,1             ! yr-1900

    MAP2 DOW,B,1            ! day of week (0=mon, 6=sun)

MAP1 BDATE,B,4,@SDATE

 

BDATE = DATE

 

MEM(X) Values

Function

Description

MEM(0)

returns the number of bytes of free space remaining in the "partition" (mostly used for variable storage, expression evaluation, stack, and possibly SBX loading.)

MEM(1)

returns total size of "partition." See MEMORY.LIT, MX_MEMORY, and the MEMORY system parameter for further discussion and methods of configuring partition size.

MEM(5)

size of compiled object code area

MEM(6)

size of DATA pool

MEM(7)

size of array storage area

MEM(8)

size of variable storage area (excluding arrays)

 

See Also

•   Constants ... Compiler Functions