ABS(n) --> n

returns floating point number without sign

Note: for integers use IABS(n%)

see also: IABS


ACOS(n) --> n (LZ only)

returns inverse cosine

see also: COS


ADDR(var) --> n%
ADDR(var()) --> n%
for arrays

returns memory address of the variable


ASC(c$) --> n%

returns ASCII-value of the first character in a string

see also: CHR$ Character Table


ASIN(n) --> n (LZ only)

returns inverse sine

see also: SIN


ATAN(n) --> n

returns arcus-tangens

see also: TAN


BAR$:(type%,mode% [,options%]) --> x$ (Barcode reader required!)

returns the barcode read by the barcode reader. The first caracter is the barcode-ID, followed by the actual barcode. Start and stop characters are only returned for CODABAR and CODE128 types. Any checksum digits will always be at the end of the returned string.

To find out which value to give the type% parameter, simply add together the values in the table below which correspond to the bar code type you wish to allow.

VALUE  ID CHAR BAR CODE TYPE
1 A EAN
2 B UPC
4 C CODE39
8 D ITF
16 E CODABAR
32 F TELEPEN
64 G MODIFIED PLESSEY
128 H PLESSEY
256 I CODE128

The mode% parameter specifies the condition under which BAR$: should return back to the OPL program:

VALUE MODE
0 wait until a good read is made
-1 wait for a good read or a key press
>0 wait for a good read or for this number of twentieths of second
<-1 wait for a good read or a key press or for this (positive) number of twentieths of a second

The options% parameter may be used to specify any or all of the options in the table below:

VALUE OPTION
1 use low current mode
2 return TELEPEN codes in numeric format, not ASCII (checksum expected)
4 use 2 checksum digits for MODIFIED PLESSEY, not 1
8 use 1 checksum digit for CODE39 (modulo 43), not 0
16 use FULL-ASCII CODE39, not 43 character CODE39
32 UPC-E is zero-suppressed (6 digits), not expanded to UPC-A (10 digits)

If you wish to specify more than one option, simply add together the values in the table. If you do not wish to use any of these options, you can omit the options% parameter completely.

Note: If you are using a very old barcode reader, type% parameters above 8 and the options% parameter may not be supported.


CHR$(n%) --> c$

returns the character specified by its ASCII number

see also: ASC Character Table


CLOCK(n%) --> n% (LZ only)

turns UDG clock on if n% is 1, off if 0, returns previous status


COS(n) --> n

returns cosinus of n

see also: ACOS


COUNT --> n%

returns the total number of records in current file


DATIM$ --> x$

returns date & time in string format (eg. "MON 01 JUN 1996 01:01:01")

see also: DAY DAYNAME$ MONTH MONTH$ YEAR HOUR MINUTE SECOND


DAY --> n%

returns day of month (1..31)

see also: DAYNAME$ DATIM$ MONTH YEAR


DAYNAME$(d%) --> x$ (LZ only)

converts d% to day of the week. 1 returns "Mon" etc.

see also: DAY


DAYS(day%,month%,year%) --> n (LZ only)

returns number of days since 1/1/1900


DEG(n) --> n

converts rad to degree

see also: RAD


DIR$("[dev]") --> filename$

DIR$("dev")
returns first filename (data file only) on dev

DIR$("")
returns next filename or "" if no more

see also: DIRW$


DIRW$("[dev:file.ext]") --> filename$ (LZ only)

DIRW$("dev:file.ext")
returns first filename (any file type) on dev, wildcards + and * allowed

DIRW$("")
returns next filename or "" if no more

Valid extensions:

ODB...Datafiles and LZ diary files
DIA.....Diary files (CM/XP format)
OPL....OPL source and code
COM...CommsLink setup files
PLN.....Spreadsheet files
PAG....Pager files
NTS.....Notepad files
see also: DIR$
DISP(n,text$|"") --> key%

DISP( 1,text$)
displays text$
tab (CHR$(7)) = line seperator

DISP(-1,"")
displays current record

DISP( 0,"")
repeats last DISP

returns number of pressed key

scrolling is controled by cursor keys, any other key ends DISP and its ASCII value is returned.

see also: VIEW PRINT


DOW(day%,month%,year%) --> n% (LZ only)

returns day of the week of the given date (1...Monday)

see also: DAYNAME$


EOF --> log

returns TRUE if an attempt to go past the end of the current file has been made (the current record pointer will point to the last record then)


ERR --> n%

returns last error number

see also: ERR$ TRAP ONERR


ERR$(n%) --> x$

returns descriptive text for error n%

see also: ERR TRAP ONERR


EXIST(file$) --> log

returns TRUE if file$ exists


EXP(n) --> n

returns (math. E)**n

see also: LN


FIND(x$) --> rec%

locates x$ in current file starting at current record

returns position (0..not found), and sets the current record pointer to the found record

Note: FIND("") is the same as NEXT

see also: FINDW


FINDW(x$) --> rec% (LZ only)

locate x$ in current file starting at current record

returns position (0..not found), and sets the current record pointer to the found record

wildcards + and * are allowed

see also: FIND


FIX$(n,dec%,width%) --> x$

converts n to a string within width% with dec% decimals, right justified if width is negative

see also: GEN$ NUM$ SCI$


FLT(n%) --> n

converts integer to float

see also: INT


FREE --> bytes

returns free bytes in main memory (i.e. pack A:)

see also: SPACE


GEN$(n,width%) --> x$

converts n to a string in most suitable format within width%, number is right justified if width is negative

see also: FIX$ NUM$ SCI$


GET --> key%

reads keybuffer, if empty waits for keypress

returns number of the pressed key

see also: GET$ KEY KEY$


GET$ --> key$

reads keybuffer, if empty waits for keypress

returns character of the pressed key

see also: GET KEY KEY$


HEX$(n%) --> x$

returns the hexadecimal representation of an integer as string


HOUR --> hour%

returns current hour from internal clock (0..23)

see also: MINUTE SECOND DATIM$


IABS(n%) --> n%

returns integer number without sign

Note: for floats use ABS()

see also: ABS


INT(n) --> n%

converts a float to an integer by cutting the decimals (vs. FLT(n%) --> n)

Note: floats are automatically converted this way if assigned to an integer

see also: INTF FLT


INTF(n) --> n

converts a float to a pseudo integer float by cutting the decimals

see also: INT


KEY --> key%

reads 1 key from keybuffer (does not wait for a key!)

returns ASCII-Value of the key or 0 if keybuffer is empty

see also: KEY$ GET GET$


KEY$ --> key$|""

reads 1 key from keybuffer (does not wait for a key!)

returns key or "" if keybuffer is empty

see also: KEY GET GET$


LEFT$(x$,n%) --> x$

returns leftmost n% characters in x$

see also: RIGHT$ MID$


LEN(x$) --> n%

returns length of the string x$


LINPUT$:(n%[,timeout%]) --> x$ (CommsLink required!)

reads from serial device until either
- n% chars are received
- the REOL or REOF char(s) are received (they will be part of the string)
- nothing is received within timeout% secs

see also: TRIG$: LSET:


LN(n) --> n

returns natural logarithm (base (math. E))

see also: LOG EXP


LOC(string$,substring$) --> n%

returns the position of a substring in a string or 0 if not found


LOG(n) --> n

returns logarithm (base 10)

see also: LN


LOWER$(x$) --> x$

returns x$ in lower case

see also: UPPER$


MAX(array(),n) --> n (LZ only)
MAX(item1[,item2...]) --> n (LZ only)

returns maximum of the first n elements of array, or of the listed items

see also: MEAN MIN STD SUM VAR


MEAN(array(),n) --> n (LZ only)
MEAN(item1[,item2...]) --> n (LZ only)

returns mean of the first n elements of array, or of the listed items

see also: MAX STD SUM VAR


MENU("item[,item...]") --> n

displays a menu, returns number of selected item (0..<ON/CLEAR>)

see also: MENUN


MENUN(n%,"item[,item...]") --> n% (LZ only)

displays menu of type n% (0 full screen, 1 one-line, 2 part screen)

returns number of selected item (0..<ON/CLEAR>)

see also: MENU


MID$(x$,start%,length%) --> x$

returns a substring of x$ starting at position start% with a length of length%

see also: LEFT$ RIGHT$


MIN(array(),n) --> n (LZ only)
MIN(item1[,item2...]) --> n (LZ only)

returns minimum of the first n elements of array, or of the listed items

see also: MAX MEAN STD SUM


MINUTE --> minute%

returns current minute from internal clock (0..59)

see also: HOUR SECOND DATIM$


MONTH --> month%

returns current month from internal clock (1..12)

see also: MONTH$ DAY YEAR DATIM$


MONTH$(m%) --> x$ (LZ only)

converts m% to name of the month. 1 returns "Jan" etc.

see also: MONTH


NUM$(n,width%) --> x$

converts a float to a string within width% without decimals, right justified if width is negative

see also: FIX$ GEN$ SCI$


PEEKB(addr%) --> byte%

returns the byte at address addr%

see also: PEEKW POKEB POKEW


PEEKW(addr%) --> word%

returns the word at address addr% and addr%+1

see also: PEEKB POKEB POKEW


PI --> 3,14159...


POS --> n%

returns position of current record in current file


RAD(n) --> n

converts degrees to rad

see also: DEG


RECSIZE --> n%

returns length of current record in current file (0..254)


REPT$(c$,n%) --> x$

replicates c$ n% times


RIGHT$(x$,n%) --> x$

returns rightmost n% characters of x$

see also: LEFT$ MID$


RND --> n

returns a 'random' float between 0.0 (inclusive) and 1.0 (exclusive)

see also: RANDOMIZE


SCI$(n,dec%,width%) --> x$

converts float to string in scientific format within width% with dec% decimals, right justified if width is negative

see also: FIX$ GEN$ NUM$


SECOND --> second%

returns current second from internal clock (0..59)

see also: HOUR MINUTE DATIM$


SIN(n) --> n

returns sinus

see also: ASIN COS TAN


SPACE --> bytes

returns free bytes on device of current file (error if no file open!)

see also: FREE


SQR(n) --> n

returns square root of n


STD(array(),n) --> n (LZ only)
STD(item1[,item2...]) --> n (LZ only)

returns standard deviation of the first n elements of array, or of the listed items

see also: MAX MEAN SUM VAR


SUM(array(),n) --> n (LZ only)
SUM(item1[,item2...]) --> n (LZ only)

returns sum of the first n elements of array, or of the listed items

see also: MAX MEAN STD VAR


TAN(n) --> n

returns tangens of n

see also: ATAN COS SIN


TRIG$:(n%,[,timeout%],x$) --> x$ (CommsLink required!)

sends x$ to serial device, then reads from serial device until either
- n% chars are received
- the REOL or REOF char(s) are received (they will be part of the string)
- nothing is received within timeout% secs

see also: LPRINT LINPUT$: LSET:


UPPER$(x$) --> x$

returns string in upper case

see also: LOWER$


USR(addr%,n%) --> n%

executes machine code

moves n% into D-Register, executes HD6303X machine code at address addr%

returns contents of X-Register

WARNING: casual use may cause total data loss (you may need to remove the battery)!

see also: USR$ ADDR


USR$(addr%,n%) --> x$

executes machine code

moves n% into D-Register, executes HD6303X machine code at address addr%, the X-Register must point to string x$ afterwards

WARNING: casual use may cause total data loss (you may need to remove the battery)!

see also: USR ADDR


VAL(exp$) --> n

converts string to float "123.45","1.2E10" are ok


VAR(array(),n) --> n (LZ only)
VAR(item1[,item2...]) --> n (LZ only)

returns variance of the first n elements of array, or of the listed items

see also: MAX MEAN STD SUM


VIEW(line%,text$) --> key%

displays (or scrolls) text$ in line%, returns number of pressed key

see also: DISP PRINT


WEEK(day%,month%,year%) --> n% (LZ only)

returns the week number of the date you specify


XFEOF: --> log (CommsLink required!)

returns TRUE if remote file is at end of file or remote file is closed

see also: XFOPEN:


XFGET$:(n%) --> x$ (CommsLink required!)

reads data from an open remote file

if file was opened as

- random access: reads n% bytes

- text: reads 1 record (max. length=n%, else error 185)

if end of the file is reached, the file will be closed and XFEOF: returns TRUE

see also: XFOPEN: XFEOF:


XFPOS:(mode%,pos) --> pos (CommsLink required!)

sets current remote-file position (only for random access files), returns the position in the file

mode%:

0....absolute
1....relative to current position
2....relative to end of file

XFPOS:(1, 0.) returns current position.
Note the decimal point after the zero: the second parameter must be a float, therefor XFPOS:(1, 0) will raise the bad parameter error.

see also: XFOPEN: XFPOS: XFGET: XFPUT: XFEOF:


XLGET$: (CommsLink required - undocumented feature!)

low level link protocol command, receives a single frame

see also: XLCON: XLDIS: XLPUT:


YEAR --> year%

returns current year from internal clock

see also: DATIM$