saves current field values as a new record at the end of the current file and sets currend record pointer to this record
positions cursor in specified column and row
sets current record pointer to previous record
see also: NEXT FIRST LAST POSITION EOF TRAP
produces a tone in specified frequency and duration
tone%=(921600/frequency)-39
freq. for A = 440 Hz, next octave *2
Note: A short beep can be produced by PRINT CHR$(9);
break a DO/UNTIL, WHILE/ENDWH loop
continues programm execution at first command after the UNTIL or ENDWH statement
see also: DO/UNTIL WHILE/ENDWH CONTINUE
closes current file
clears the screen
Note: PRINT CHR$(12); also clears the screen
continues programm execution at beginning of a loop, skipping the rest of commands in the loop
Example:
DO WHILE lexp1
<commandlist 1> <commandlist 1>
IF lexp2 IF lexp2
CONTINUE CONTINUE
ENDIF ENDIF
<commandlist 2> <commandlist 2>
UNTIL lexp1 ENDWH
In the above examples, the commands in list 1 will be executed every time, the
ones in list 2 will only be executed if lexp2 returns FALSE
see also: DO/UNTIIL WHILE/ENDWH BREAK
copies a specified data file (or all data files, if only the pack is specified) to another pack.
If the file already exists, the contents of the file will be appended to the existing file.
Copy file(s) of any type, wildcards + and * are allowed
Valid extensions:
creates & opens file, defines up to 16 fieldvars
sets current file pointer to this file and current record pointer to first record
max. 4 files may be opened at the same time (handles A to D)
shows/hides cursor
Note: cursor is always on in EDIT and INPUT
deletes datafile file$ (or marks it as deleted on Datapacks)
deletes file(s) of any type, wildcards + and * are allowed
Valid extensions:
executes a list of commands until lexp returns TRUE
see also: WHILE/ENDWH BREAK CONTINUE
allows editing of the content of a string variable / field-variable
deletes current record, the current record pointer is set to the following record
see also: TRAP
ESCAPE ON (default)
pressing ON/CLEAR halts the program. If you press Q now, error 206 (ESCAPE)
will be raised to stop program execution, any other key resumes program execution.
ESCAPE OFF
program execution is not stopped
WARNING: If your program goes into a neverending loop and ESCAPE is OFF, the only thing you can do is to remove the battery! Try to remove it only for some seconds and you might not loose all your data (don't count on that!)
Note: If you own a nationalized Organizer, the Escape key sequence might be different (e.g. the german one is ON/CLEAR + A)
sets current record pointer to the first record in the current file
see also: LAST NEXT BACK POSITION TRAP
| GLOBAL name[%][,...] | declares a global float or integer variable |
| GLOBAL name[%](elements)[,...] | declares a global float/integer array |
| GLOBAL name$(size)[,...] | declares and sizes a global string variable |
| GLOBAL name$(elements,size)[,...] | declares and sizes a global string array |
Global variables are seen in the procedure they are declared in and all subsequent procedures.
Notes:
- Strings must be seized (1..255).
- Arrays can only have one dimension, the number of elements is limited only
by available memory.
- Any variable must be declared at the very beginning of the procedure (before
any command/function is called)
see also: LOCAL
continues program execution at a label
Labels are composed of a name followed by two colons. The label must be first item in the line.
Note: The excessive use of GOTO is BAD PROGRAMMING STYLE (spaghetti code)! Use IF/ENDIF, DO/UNTIL or WHILE/ENDWH instead!
Hint: Unlike most other programming languages, it is possible not only to exit a loop or a IF branch via GOTO but also to (re)enter it.
see also: IF/ENDIF DO/UNTIL WHILE/ENDWH
executes different commands depending on the results of lexp
Note: ELSE[IF] and ENDIF are seperate commands, so the next statement must be in a new line or seperated by a colon (e.g. IF HOUR>12 :PRINT "Afternoon" :ELSE :PRINT "Morning" :ENDIF)
inputs data from keyboard to a string or numeric variable/field-variable
sets the keyboard mode
n%=1....upper characters
n%=2....lower characters
n%=3....numerical keyboard, upper characters
n%=4....numerical keyboard, lower characters
sets current record pointer to the last record in the current file
see also: FIRST NEXT BACK POSITION TRAP
| LOCAL name[%][,...] | declares a local float or integer variable |
| LOCAL name[%](elements)[,...] | declares a local float/integer array |
| LOCAL name$(size)[,...] | declares and sizes a local string variable |
| LOCAL name$(elements,size)[,...] | declares and sizes a local string array |
Local variables are only seen in the procedure they were declared in.
Notes:
- Strings must be seized (1..255).
- Arrays can only have one dimension, the number of elements is limited only
by available memory.
- Any variable must be declared at the very beginning of the procedure (before
any command/function is called)
see also: GLOBAL
prints to serial device
parameters see: PRINT
| LSET:( | baud%, | 9600|4800|2400|1200|600|300|150|110|75|50 |
| parity%, | 0..none, 1..odd, 2..even, 3..mark, 4..space | |
| bits%, | 7|8 | |
| stop%, | 1|2 | |
| hand%, | Handshake: 0..none, 1..XON, 2..RTS, 3..XON+RTS, 4..DTR, 5..XON+DTR, 6..RTS+DTR, 7..all | |
| echo%, | 0..local, 1..host | |
| width%, | 0..none, 1..254 max. line width | |
| reol$, | receive EOL-character(s) (len=0..2, default: CR+LF) | |
| reof$, | receive EOF-character(s) (len=0..2, default: SUB ($1A)) | |
| rtrn$, | receive translation table (pairs of characters, default: "") | |
| teol$, | transmit EOL-character(s) (len=0..2, default: CR+LF) | |
| teof$, | transmit EOF-character(s) (len=0..2, default: SUB) | |
| ttrn$, | transmit translation table (pairs of characters, default: "") | |
| timeout%, | 0..none, 1..255 secs | |
| protocol%) | 0..none, 1..XMODEM, 2..psion |
CommsLink Setup
Note: You do not have to enter all parameters, -1 acts as dummy even
for strings
e.g. LSET:(-1,-1,-1,-1,2) sets RTS-Handshaking on, leaving other settings intact
sets current record pointer to next record in the current file
see also: BACK FIRST LAST POSITION EOF TRAP
turns off Organizer, program execution is continued after waking organizer
OFF n% (LZ only)
turns off Organizer for specified time (in seconds, max. 1800)
ONERR label::
activates error trapping, if an error occurs, the program execution will be
continued at the label
ONERR OFF
disactivates error trapping
Labels are composed of a name followed by two colons. The label must be first item in the line.
see also: TRAP
opens an existing file and defines up to 16 fieldvars
sets current file pointer to this file and current record pointer to first record
max. 4 files may be opened at the same time (handles A to D)
pauses program execution
n=0....wait for key
n<0....wait n/20 secs for key
n>0....pause n/20 secs
Does not remove the key from the keybuffer!
writes a byte into memory at address addr% (at your own risk!)
If the address is in the protected range $00 to $3F or $282 to $400 then it does nothing.
writes word (2 bytes) into memory at address addr% and addr%+1 (at your own risk!)
If the address is in the protected range $00 to $3F or $282 to $400 then it does nothing.
sets current record pointer to the n'th record of current file
see also: NEXT BACK FIRST LAST EOF TRAP
shows expression results on display
comma inserts 1 blank, seperator at end of command disables new line
artifically generates error no. n%
initializes random number generator
Note: if you use a number again, the resulting 'random' number set will be the same too!
see also: RND
remark (rest of line will be ignored)
renames a file (not for moving over devices!)
returns to calling procedure
if used in a function: passes function return value
stops program execution
defines UDG (user defined graphic) u% (0..7) with pattern lines p_% (0..31)
Note: UDGs may be redefined while being displayed - this feature allows
small animations!
CMs and some very old XPs erase UDGs when turned off.
The following procedure is the replacement for the UDG command on CM/XP's:
UDG:(u%,p1%,p2%,p3%,p4%,p5%,p6%,p7%,p8%)
POKEB $180, 64+(u% AND 7)*8
POKEB $181, p1%
POKEB $181, p2%
POKEB $181, p3%
POKEB $181, p4%
POKEB $181, p5%
POKEB $181, p6%
POKEB $181, p7%
POKEB $181, p8%
deletes current record, appends current field values as new record in current
file,
sets current record pointer to this record which is always the last one
sets current file pointer to an already opened file
repeats commands while lexp is TRUE
see also: DO/UNTIL BREAK CONTINUE
closes a file opened by XFOPEN:() (no error if none open)
see also: XFOPEN:
opens remote file on PC-Server (CL.EXE)
"/" is converted to "\" in remotefile$
openmode%:
see also: XFCLOSE: XFPOS: XFGET: XFPUT: XFEOF:
writes data to an open remote file
random access files: writes x$ at current position
text files: appends x$ as new record
see also: XFOPEN: XFPOS: XFGET:
low level link protocol command, establishes a connection
see also: XLDIS: XLGET$: XLPUT:
low level link protocol command, terminates a connection
see also: XLCON: XLGET$: XLPUT:
low level link protocol command, sends a single frame
May be used to terminate the Commslink server by calling the EXIT overlay:
XLCON: :XLPUT:("EXIT") :XLDIS:
see also: XLCON: XLDIS: XLGET$:
loads the relocatable boot code from remote file name$ to address addr%, but
rejects it if the code exceeds length len%.
Absolute addresses in the code are adjusted to starting address addr% by the
Commslink server.
receives a file from PC-Server (CL.EXE)
"/" is converted to "\" in remotefile$
filetype%:
| value | PC-extension | type |
| 0 | ODB | data file |
| 1 | OPL | OPL-program source file |
| 2 | OB2 | diary file |
| 3 | OB3 | executable file (may also contain OPL-source) |
| 4 | OB4 | CommsLink setup file |
| 5 | OB5 | spreadsheet file |
see also: XTSEND:
sends a file to PC-Server (CL.EXE)
"/" is converted to "\" in remotefile$
filetype%:
| value | PC-extension | type |
| 0 | ODB | data file |
| 1 | OPL | OPL-program source file |
| 2 | OB2 | diary file |
| 3 | OB3 | executable file (may also contain OPL-source) |
| 4 | OB4 | CommsLink setup file |
| 5 | OB5 | spreadsheet file |
see also: XTRECV: