OPLDatabaseFile ROM::PSAPPLE.WDR Command Command: Command: Syntax: Purpose: KEYWORDS: bit diam gtext opa control dir io sprite conv draw key statwin data error lib string date event math text device file mem time dialog font menu winm .ABS .IABS _conv a=ABS(x) i&=IABS(x&)FReturn the absolute value of fp or int x (ABS) and long int x& (IABS).U .ADDR _mem a%=ADDR(var)0 and closed if am%<0.,p% = new cell pointer or 0 if out of memory.t .ALERT _dialogwr%=ALERT(m1$, m2$, b1$, b2$, b3$) r%=ALERT(m1$, m2$, b1$, b2$) r%=ALERT(m1$, m2$, b1$) r%=ALERT(m1$, m2$) r%=ALERT(m1$)!Displays a simple "alert" dialog. m1$ Message for the 1st line m2$ Message for the 2nd line b1$ Text above Esc button b2$ Text above Enter button b3$ Text above Space button r%= 1 Esc is pressed 2 Enter is pressed 3 Space is pressed .ALLOC .REALLOC _mem1pcell%=ALLOC(size%) pcell%=REALLOC(pcell%, size%) ALLOC allocates specified amount of memory returning pointer to the cell pcell%. REALLOC changes the size of previously allocated pcell% returning new pointer."Both return NULL if out of memory.P .APP. . .ENDA _opa APP name . . . ENDA(Begins definition of an OPA called name.u .APPEND _data APPEND_Appends a new blank record to the end of the current data file and makes it the current record.h .APPENDSPRITE _spriteGAPPENDSPRITE time%, var bit$(), dx%, dy% APPENDSPRITE time%, var bit$()2Appends a single bitmap-set to the current sprite.-time% "shatter speed" in 1/10ths of a second.Sbit$() 6 bitmap filenames or "" for no bitmap. Array elements represent bitmaps to: 1 set black 2 clear black 3 invert black 4 set grey 5 clear grey 6 invert greyk .ASC _string _conv a%=ASC(a$)LReturns the ASCII character code of the first character of a$ or 0 if a$="". .AT _text AT x%, y% Positions the text cursor. x% text column (1 to 60) y% text row (1 to 17))The ranges assume using the default font.J .BEEP BEEP time%, pitch% Sounds the buzzer. time% in 1/32nds of a second (max is 3840 = 2 minutes). If time%<0, BEEP first checks to see if the sound system is free and returns if it is. Otherwise, BEEP waits until the sound system is free. pitch% 512/(pitch%+1) kHz'freq=440*2**(n%/12), n%=1 for middle A BEEP 5,300 sounds ok.D .BREAK _control BREAK-Exits a DO ... UNTIL or WHILE ... ENDWH loop. .BUSY _gtext6BUSY str$, c%, delay% BUSY str$, c% BUSY str$ BUSY OFF Displays a "busy" message.!str$ the message (up to 19 chars) c% corner position: 0 top left 2 top right( 1 bottom left (default) 3 bottom right delay% delay time in seconds .CACHE _mem CACHE init%, max% CACHE ON/OFFICreates a procedure cache of init% bytes that can grow up to max% bytes.MCACHE OFF disables the created cache that can be then re-enabled by CACHE ON.U .CACHEHDR _mem CACHEHDR addr(hdr%()) Fills 11-element array hdr%() with cache info that changes whenever a procedure is called. The elements of hdr%() (meaningful only if hdr%(10) is not 0) contain: 1 address of cache 2 number of cached procedures 3 max size of cache in bytes 4 current size of cache in byted 5 free bytes in cache36 total number of unused bytes in cached procedures77 offset from start of index to first free index record-8 ...to most recently used record (0 if none).9 ...to least recently used record (0 if none)%10 address of cache index (0 if none) 11 true if cacheing is ON- .CACHEREC _mem CACHEREC addr(rec%()), off% Fills 18-element array rec%() with cache index record at offset off%. Info changes whenever procedure is called. Elements of rec%() contain:(1 offset to less recently used procedure(2 offset to more recently used procedure 3 usage count34 offset within cache to procedure frame descriptor$5 ...to translated code of procedure 6 ...to end of translated code#7 number of bytes used by procedure-8-15 procedure name, followed by private data 16 address of module name 17 address of cache index 18 true if cache is OND .CACHETIDY _mem CACHETIDY)Removes any unused procedures from cache.I .CALL$e%=CALL(s%, bx%, cx%, dx%, si%, di%) Makes operating system calls. .CHANGESPRITE _spriteQCHANGESPRITE ix%, time%, var bit$(), dx%, dy% CHANGESPRITE ix%, time%, var bit$()aChanges the bitmap-set specified by ix% (starting with 1). See APPENDSPRITE for other parameters.J .CHR$ _string _conv a$=CHR$(x%))Returns the character with ASCII code x%.t .CLOSE _data CLOSE`CLOSE closes the current data file. If the file is stored on a RAM media, it is also compressed.D .CLOSESPRITE _sprite CLOSESPRITE id% Closes the sprite with ID id%.V .CLS _text CLSFClears the contents of the text window and resets the cursor position. .CMD$ _opa c$=CMD$(x%)BReturns the command-line arguments passed when starting a program. x% c$ 1 Program full path name 2 File full path name 3 "C" (Create) or "O" (Open) 4 Alias information, if any 5 Applicaion name x%=2 to 5 is for OPAs only .COMPRESS _data COMPRESS src$, dest$ Copies data file src$ to another data file dest$. If the destintion file already exists, the records are appended. Supports wildcards.z .CONTINUE _control CONTINUE]Makes a program immediately go to the test condition of DO ... UNTIL or WHILE ... ENDWH loop.y .COPY _file COPY src$, dest$[Copies the file src$, which may be of any type, to the file dest$. Wildcards are supported.g .COUNT _data c%=COUNTPReturns the number of records in the current data file (0 if the file is empty).A .CREATE .OPEN .OPENR _dataVCREATE file$, log, f1, f2,... OPEN file$, log, f1, f2,... OPENR file$, log, f1, f2,...cCREATE creates a new data file. An existing one can be opened normally (OPEN) or read-only (OPENR). file$ data file name*log logical file name log (A, B, C, or D))f1, f2... names of data fields (up to 32)R .CREATESPRITE _sprite id%=CREATESPRITE*Creates a sprite, returning the sprite ID. .CURSOR _text _gtextcCURSOR ON/OFF CURSOR id%, asc%, width%, height% CURSOR id%, asc%, width%, height%, type% CURSOR id%gSwitches cursor on and off, specifies the cursor's shape and position relative to the baseline of text. id% specifies a window asc% font ascent - number of pixels (-128 to 127) by which the top of the cursor should be above the baseline (default: current font). width% 0 to 255 (default: 2)(height% 0 to 255 (default: current font) type% 1 obloid cursor 2 not flashing 4 grey #.DATETOSECS .SECSTODATE _date _time}s&=DATETOSECS(yr%, mo%, dt%, hr%, min%, sec%) SECSTODATE s&, var yr%, var mo%, var dy%, var hr%, var mn%, var sc%, var yrday%-Convert between seconds and other time units.$s& seconds since 00:00 on 1/1/1970 yrday% day in the year (1-366)q .DATIM$ _date _time d$=DATIM$RReturns the current date and time as a string, such as "Sat 11 Dec 1993 10:14:30".l .DAY .MONTH .YEAR _date d%=DAY m%=MONTH y%=YEAR Function: returns: DAY 1-31 MONTH 1-12 YEAR 1900-2155 .DAYNAME$ .MONTH$ _date d$=DAYNAME$(d%) m$=MONTH$(m%)6Convert d% to the day of the week or m% to month name. d%= 1 (MON) ... 7 (SUN) m%= 1 (Jan) ... 12 (Dec)R .DAYS _date d&=DAYS(day%,month%,year%)*Returns the number of days since 1/1/1900.E .dBUTTONS _dialogSdBUTTONS p1$, k1%, p2$, k2%, p3$, k3% dBUTTONS p1$, k1%, p2$, k2% dBUTTONS p1$, k1%:Defines up to 3 exit keys to go at the bottom of a dialog. p$ text above a button k% keycode of the key, e.g., %A is the code for "A" (DIALOG returns keycodes for lowercase letters). Negative value defines a "cancel" key. .dCHOICE _dialog dCHOICE var choice%, p$, list$(Defines a choice list to go in a dialog.Qchoice% specifies the initial choice (starting with 1) and accomodates the result p$ prompt on the left side6list$ possible choices separated by commas ("Yes,No") .dDATE _dialog _date dDATE var lg&, p$, min&, max&2Defines an edit box for a date, to go in a dialog.Xlg& specifies the initial date (in days since 1/1/1900) and accomodates the result value p$ prompt on the left side min& minimum value allowed max& maximum value allowed .dEDIT _dialog+dEDIT var str$, p$, len% dEDIT var str$, p$-Defines a string edit box, to go in a dialog. str$ string variable to edit p$ prompt on the left sideBlen% the width of the edit box (in widths of the widest character) .DEFAULTWIN _win DEFAULTWIN mode%IToggles the grey mode in the default window (ID=1) and clears the window.+mode%=1 enables use of grey, 0 disables it.S .DEG .RAD _conv d=DEG(radians) r=RAD(degrees)$Convert between radians and degrees.P .DELETE _file DELETE filename$0Deletes any type of file. Wildcards can be used.} .dFILE _dialog dFILE var str$, p$, f%/Defines a filename edit box, to go in a dialog.%str$ must be at least 128 chars long. p$ prompt on the left side f% meaning (can be combined): 1 Use edit box 2 Allow directory names 4 Directory names only 8 Disallow existing files 16 Query existing files 32 Allow null string input 64 Don't display extension 128 obey/allow wildcards .dFLOAT .dLONG _dialog9dFLOAT var fp, p$, min, max dLONG var lg&, p$, min&, max&BDefine an edit box for a fp or long int number, to go in a dialog.&fp variables to accomodate the result p$ prompt on the left side min minimum value allowed max maximum value allowed .DIALOG _dialog n%=DIALOG/Presents the dialog prepared by dINIT. Returns:T- keycode which ended the dialog if dBUTTONS were used (lowercase code for letters).V- line # of the item which was current when Enter was pressed (the top item being #1). - 0 if the dialog was cancelled. .DIAMINIT _diam DIAMINIT pos%, str1$, str2$, ... Initializes the diamond list pos% meaning: >0 position of the diamond =0 no list is defined& <0 puts the icon instead of the list(str$ text for each entry to be displayed^ .DIAMPOS _diam DIAMPOS pos%APositions diamond on the list. pos%=0 removes the diamond symbol. .dINIT _dialog dINIT title$ dINITAPrepares for definition of a dialog, cancelling any existing one.Positions a dialog (used between dINIT and DIALOG) as follows: -1,-1 0,-1 1,-1 -1,0 0,0 1,0 -1,1 0,1 1,1n .DRAWSPRITE _sprite DRAWSPRITE x%, y%GDraws the current sprite in the current window with top-left at x%, y%. .dTEXT _dialog#dTEXT p$, body$, t% dTEXT p$, body$3Defines a line of text to be displayed in a dialog. p$ prompt on the left t% 0 left-align 1 right-align 2 center $100 use bold text) $200 draw line below (1 line per dialog) $400 allow text to be selected .dTIME _dialog _time!dTIME var lg&, p$, t%, min&, max&2Defines an edit box for a time, to go in a dialog. lg& seconds after 00:00 p$ prompt on the left side"t% 0 absolute time without seconds 1 absolute time with seconds 2 duration without seconds 3 duration with seconds .dXINPUT _dialog dXINPUT var str$, p$JDefines a secret string edit box, such as for password, to go in a dialog. str$ at least 8 chars long p$ prompt on the left side^ .EDIT _text EDIT a$IDisplays a string variable a$ which can be edited directly on the screen.W .EOF _data _io e%=EOF@Returns -1 if the end of the file has been reached, otherwise 0.c .ERASE _data ERASEOErases the current record in the current file. The next record becomes current.i .ERR _error e%=ERRUReturns the number of the last error which occurred, or 0 if there has been no error.T .ERR$ _error e$=ERR$(x%):Returns the error message for the specified error code x%. .ESCAPE ESCAPE ON/OFFuESCAPE OFF stops -Esc being used to break out of the program when it is running. ESCAPE ON re-enables this feature.n .EVAL _conv d=EVAL(s$)VEvaluates the mathematical string expression s$ and returns the floating-point result.v .EXIST _file e%=EXIST(filename$)TChecks to see that a file with filename$ exists. Returns -1 if it does, otherwise 0.- .EXP _math e=EXP(x) Returns e^x (e=2.71828).a .EXT _opa EXT name$LGives the file extension of files used by an OPA. Used between APP and ENDA.! .FIND .FINDFIELD _data1f%=FIND(a$) f%=FINDFIELD(a$, start%, no%, flags%) Search the current data file for string fields matching a$. Wildcards * and ? can be used. Return the number of the found record and makes it current.-start% field to start looking in (1 is first).no% number of fields (from start%) to look in!flags% meaning (can be combined): 0 case-independent (default) 1 case-dependent% 0 search backwards from current rec! 16 ...forwards from current rec" 32 ...backwards from end of file$ 48 ...forwards from start of file .FINDLIB _lib ret%=FINDLIB(var cat%, name$)zFind DYL category name$ (including .DYL extension) in ROM. On success returns zero and writes the category handle to cat%. ,.FIRST .LAST .NEXT .BACK .POSITION _data FIRST POSITION x%TMove to a different record in the current data file. x% specifies the record number.1 .FIX$ .SCI$ _conv%f$=FIX$(x, y%, z%) s$=SCI$(x, y%, z%) Returns a string representation of x to y% decimal places (FIX$) or in scientific format (SCI$). The string will be up to z% characters long.jIf z%<0 then the string is right-justified. Returns asterisks if the result does not fit in z% characters.K .FLT _conv f=FLT(x&)5Converts an integer expression x& into a fp number f.f .FONT _text _font FONT id%, style%BSets the text window font and style (see gSTYLE for more details).N .FREEALLOC _mem FREEALLOC pcell%,Frees a previously allocated cell at pcell%.k .gAT _draw _gtext gAT x%, y%MSets the current position in the current drawable using absolute coordinates.G .gBORDER .gXBORDER _draw _winmgBORDER flags%, width%, height% gBORDER flags% gXBORDER type%, flags%, width%, height% gXBORDER type%, flags%dDraws a one-pixel wide border around the edge of the current drawable or a rectangle (if specified).%flags% effect (some can be combined): 1 single pixel shadow 2 gap for single pixel shadow 3 double pixel shadow 4 gap for double pixel shadow $100 one-pixel gap all round $200 more rounded corners) $400 single pixel off corners (gXBORDER) type% Border:# 0 S3 type (flags% as for gBORDER)) 1 S3a grey and black (grey plane req'd)^ .gBOX _draw gBOX width%, height%0) or right (m%<0) of the box to the region in which to center. .gPRINTCLIP _gtext w%=gPRINTCLIP(text$, width%) Displays text$ at the current position, displaying only as many characters as will fit inside width% pixels. Returns the number of characters displayed.] .gRANK _win rank%=gRANKDReturns the fore/background position (1 to 8) of the current window. .gSAVEBIT _win _bit.gSAVEBIT name$, width%, height% gSAVEBIT name$ Saves the current drawable or a rectangle, if specified, to the bitmap file name$. If the drawable had a grey plane, it will save both planes, first black, then grey. The default extension is PIC. .gSCROLL _draw _win _bit1gSCROLL dx%, dy%, x%, y%, w%, h% gSCROLL dx%, dy%YScrolls pixels (of a rectangle, if specified) in the current drawable by offset dx%, dy%. .gSETWIN _win.gSETWIN x%, y%, width%, height% gSETWIN x%, y%AChanges position and, optionally, the size of the current window. .gSTYLE _gtext _font gSTYLE style%oSets the style of text displayed in subsequent gPRINT, gPRINTB and gPRINTCLIP commands on the current drawable. style% text style (combination): 0 normal 1 bold 2 underlined 4 inverse 8 double height 16 mono 32 italic .gTMODE _gtext gTMODE mode%kSets the way characters are displayed by subsequent gPRINT and gPRINTCLIP commands on the current drawable. mode% 0 set (default) 1 cleared 2 inversed 3 replacedb .gTWIDTH _gtext _font w%=gTWIDTH(text$)9Returns the width of text$ in the current font and style.[ .gUPDATE _win _draw gUPDATE ON/OFF gUPDATE/Toggles the screen update feature or forces it.9 .gUSE _win _bit gUSE id% Makes the drawable id% current.N .gVISIBLE _win gVISIBLE ON/OFF.Makes the current window visible or invisible.i .gWIDTH .gHEIGHT _win _bit w%=gWIDTH h%=gHEIGHT8Return the width and the height of the current drawable.S .gX .gY _draw x%=gX y%=gY8Return the the current position in the current drawable.o .gXPRINT _gtext gXPRINT string$, flags% Displays string$ (not a list of expressions) at the current position, using the effects specified. The current text style and pixel modes are used. flags% effect: 0 normal, as with gPRINT 1 inverse! 2 inverse, except corner pixels 3 thin inverse& 4 thin inverse, except corner pixels 5 underlined 6 thin underlinedA .HEX$ _conv h$=HEX$(x&)(Converts integer or long integer to hex.r .HOUR .MINUTE .SECOND _time h%=HOUR m%=MINUTE s%=SECOND Function: returns: HOUR 0-23 MINUTE 0-59 SECOND 0-59r .ICON _opa ICON name$[Gives the name of the bitmap file to use as the icon for an OPA. Used between APP and ENDA.b $.IF...ELSEIF...ELSE...ENDIF _controlReturns the length of the previously allocated cell at pcell%.T .LINKLIB _lib LINKLIB(cat%)7Link any libraries that have been loaded using LOADLIB.K .LN .LOG _math a=LN(x) a=LOG(x)*Return base e and base 10 logarithms of x. .LOADLIB .UNLOADLIB _lib=ret%=LOADLIB(var cat%, name$, link%) ret%=UNLOADLIB(var cat%)dLOADLIB loads and optionally links a DYL that is not in the ROM. Writes the category handle to cat%."UNLOADLIB unloads DYL from memory. Both return zero, if successful. .LOADM .UNLOADM _mem LOADM module$ UNLOADM module$ LOADM loads a translated OPL module so that procedures in that module can be called. Up to 4 modules can be opened. Uses the program's directory, not affected by SETPATH.)UNLOADM unloads previously loaded module.} .LOC _string a%=LOC(a$, b$)`Returns the position in a$ where b$ occurs or zero if it doesn't. The match is case-independent.m .LOCK _opa LOCK ON/OFFUMark an OPA as locked or unlocked. Lock is used to prevent an OPA from System events. .LOPEN .LCLOSE _device LOPEN device$ LCLOSELLOPEN opens the device to which LPRINTs are to be sent and LCLOSE closes it. device$: opens: "PAR:A" parallel port "TTY:A" serial port .LPRINT _device LPRINT list of expressions|Prints a list of items in the same way as PRINT, except that the data is sent to the device most recently opened with LOPEN. $.MAX .MIN .MEAN .SUM .STD .VAR _math a=F(list) a=F(array(), element)&list - expressions separated by commasZelement - number of array elements to operate on (counted from the beginning of the array) MAX - greatest number MIN - smallest number MEAN - average SUM - sum STD - standard deviation VAR - variance Formulas used:# STD()=sqr[sum(xi-mean(x))^2/(n-1)] pop.std()=STD()*sqr[(n-1)/n] VAR()=sum[xi-mean(x)]^2/(n-1) pop.var()=VAR()*(n-1)/n .mCARD _menu;mCARD title$, n1$, k1% mCARD title$, n1$, k1%, n2$, k2%,...:Defines a menu. Up to 8 pairs of n$ and k% may be defined. title$ name of the menu n$ item name k% keycode for a hot-key .MENU _menu val%=MENU val%=MENU(var init%)yDisplays the menus defined by mINIT and mCARD. Returns hot-key keycode of the item selected (in lower case) or 0 for Esc.-init% sets the initial item to be highlighted init%=256*(menu%)+item%'(both menu% and item% start count at 0)} .MID$ _string m$=MID$(a$, x%, y%)ZReturns a string comprising y% characters of a$, starting at the character at position x%.T .mINIT _menu mINIT@Prepares for definition of menus, cancelling any existing menus.r .MKDIR .RMDIR _dir MKDIR name$ RMDIR name$FCreate or remove a directory name$. Can only remove empty directories. .NEWOBJ NEWOBJH. _lib6pobj%=NEWOBJ(num%, clnum%) pobj%=NEWOBJH(cat%, clnum%) Create a new object by category number num% (NEWOBJ) or by category handle cat% (NEWOBJH) belonging to the class clnum%, returning the object handle on success or zero if out of memory. .ODBINFO _data ODBINFO var info%() Fills 4-element array info%() with pointers to descriptive records for 4 open data files with logical names A, B, C and D. Each record has the following format: offset bytes descriptionG 0 2 DBF system's file control block (handle) or zero if file not open7 2 2 offset in the record buffer to the current record& 4 2 pointer to the field name buffer 6 2 number of fields' 8 2 pointer to start of record buffer 10 2 length of a NULL record& 12 1 non-zero if all fields are text" 13 1 non-zero for read-only file. 14 1 non-zero if record has been copied down 15 1 number of text fields 16 2 pointer to device namer OFF x% Switches the S3a off.Kx% number of seconds (8 to 16383) after which the S3a turns itself back on. .ONERR _error'ONERR label ONERR label:: ONERR OFF Establishes an error handler in a procedure. When an error is raised, the program jumps to the label. ONERR OFF disables ONERR. .OS+a%=OS(i%, addr1%) a%=OS(i%, addr1%, addr2%)WCalls the OS interrupt i%, reading the values of all returned 8086 registers and flags.+addr1%, addr2% pointers to 12-byte buffers.' .PARSE$ _dir _file p$=PARSE$(f$, rel$, var off%())eReturns a full file specification from the filename f$, filling in any missing information from rel$.7For example: p$=PARSE$("NEW","LOC::M:\ODB\*.ODB", x%()) sets p$ to "LOC::M:\ODB\NEW.ODB" and x%() to (1,6,8,13,16,0) off%() (at least 6 integers)" 1 filing system offset (always 1) 2 device offset 3 path offset 4 filename offset 5 file extension offset* 6 flags for wildcards in returned string: 0 no wildcards 1 wildcard in filename 2 wildcard in file extension 3 wildcard in both` .PATH _opa PATH name$IGives the directory to use for an OPA's files. Used between APP and ENDA. .PAUSE _control _key PAUSE x%7Pauses the program for a certain time, depending on x%. x% result:I0 waits for a key-press (GET, GET$, KEY or KEY$ will return the keycode) >0 pauses for x%/20 seconds7<0 pauses for x%/20 seconds or until a key is pressed.f J.PEEKB .PEEKW .PEEKL .PEEKF .PEEK$ .POKEB .POKEW .POKEL .POKEF .POKE$ _mem value=PEEK?(x%) POKE? x%, value|PEEK reads a value from and POKE writes a value to the specified address x%. The ? represents the type of the value: length: B integer 1 byte W integer 2 bytes L long integer 4 bytes F floating-point 8 bytes%$ string varies (stored in byte 1)" .PI _math Returns 3.14159...j .POS _data p%=POSWReturns the number of the current record in the current data file (1 being 1st record).W .POSSPRITE _sprite POSSPRITE x%, y%2Sets the position of the current sprite to x%, y%.U .PRINT _text PRINT list of expressions-Displays a list of expressions on the screen.2 .RAISE _error RAISE x% Raises an error number x%.; .RANDOMIZE _math RANDOMIZE x& Gives a start value for RND.u .RECSIZE _data r%=RECSIZEZReturns the number of bytes occupied by the current record (the limit is 1022 characters).! REM text Precedes a remark.t .RENAME _file _dir RENAME from$, to$NRenames from$ as to$. No wildcards allowed, but can rename across directories.R .REPT$ _string r$=REPT$(a$, x%)1Returns a string comprising x% repetitions of a$. .RETURN _control RETURN RETURN var Terminates the execution of a procedure and returns control to the point where that procedure was called, optionally passing the value of variable.L .RND _math r=RND:Returns a random floating-point number in the range [0,1). .SCREEN _text _win5SCREEN width%, height% SCREEN width%, height%, x%, y% Changes the size of the text window. x%, y% specify the character position of the top left corner, otherwise the text window is centered on the screen. .SCREENINFO _text _win _font SCREENINFO var info%()FFills 10-element array info%() with information about the text screen. info%() Description 1 left margin in pixels 2 top margin in pixels( 3 text screen width in character units) 4 text screen height in character units 5 reserved 6 font id( 7 pixel width of text window char cell$ 8 pixel height of text window line 9, 10 reserved !.SEND .ENTERSEND .ENTERSEND0 _libpret%=SEND(pobj%, m%, var p1, ...) ret%=ENTERSEND(pobj%, m%, var p1, ...) ret%=ENTERSEND0(pobj%, m%, var p1, ...) SEND sends a message to the object pobj% to call the method m%, passing up to 3 arguments (p1..p3) and returning the value ret% returned by the selected method.eENTERSEND - same as SEND except that, if the method leaves, the error code is returned to the caller.PENTERSEND0 - same as ENTERSEND except it returns 0 if the method does not leave. .SETNAME _dir _opa SETNAME name$hSets the name of the running OPA to name$ and redraws any status window, using that name below the icon.N .SETPATH _dir _file SETPATH name$+Sets the current directory for file access.i &.SIN .COS .TAN .ASIN .ACOS .ATAN _math a=F(x):Return respective trig functions of x supplied in radians.s .SPACE _mem s&=SPACE]Returns the number of free bytes on the device on which the current (open) data file is held.2 .SQR _math s=SQR(x) Returns the square root of x. .STATUSWIN _statwin$STATUSWIN ON, type% STATUSWIN ON/OFF.Displays or removes a permanent status window. type% 1 small status window 2 large status window .STATWININFO _statwin t%=STATWININFO(type%, var xy%()) Fills 4-element array xy%() with information about size of the status window according to the specified type%. Returns type of the current status window t% or zero if there is none. xy%() contains: 1 left x 2 top y 3 width 4 height type%: which status window: 1 small 2 large 3 S3-compatible -1 whichever is current. .STOP _control Ends the running program.p .STYLE _font _text STYLE style%%Sets the text window character style. style% result: 2 underlined 4 inverseY .TESTEVENT _event t%=TESTEVENT9Returns True if an event has occurred, otherwise - False.( .TRAP _error TRAP command Traps any error resulting from the execution of the command. Program execution will continue, but ERR will be set to the error code. TRAP overrides any ONERR and may precede any of these commands: Data file commands APPEND, UPDATE" BACK, NEXT, LAST, FIRST, POSITION( USE, CREATE, OPEN, OPENR, CLOSE, DELETE File commands COPY, COMPRESS, ERASE, RENAME LOPEN, LCLOSE LOADM, UNLOADM Directory commands MKDIR, RMDIR Data entry commands EDIT, INPUT Graphics commands gSAVEBIT, gCLOSE, gUSE! gUNLOADFONT, gFONT, gPATT, gCOPY .TYPE _opa TYPE num%@Sets the type of an OPA, from 0 to 4. Used between APP and ENDA. 0 no files 1 1 file 2 many files, only 1 open 3 many files can be opened 4 many files / runs programsQ $100 Enables to close OPA from the System screen without sending a quit message $1000 use 48 48 black/grey icon) $4000 disable closing from System screen5 $8000 disable New File option from the System screen .UADD .USUB _mem+i%=UADD(val1%, val2%) i%=USUB(val1%, val2%)~Add or subtract val1% and val2%, as if both were unsigned integers (0-65535). Prevent integer overflow for pointer arithmetic. .UPDATE _data UPDATE Deletes the current record in the current data file, saves the current field values as a new record at the end of the file and makes it the current record.u .UPPER$ .LOWER$ _string _conv b$=UPPER$(a$) b$=LOWER$(a$):Convert all characters in string a$ to upper or lowercase.W .USE _data USE logical name:Selects the data file with the logical name A, B, C, or D.J .USESPRITE _sprite USESPRITE id%(Make sprite with id% the current sprite. .USR .USR$@u%=USR(pc%, ax%, bx%, cx%, dx%) u$=USR$(pc%, ax%, bx%, cx%, dx%)7Execute machine code, returning an integer or a string.g .VAL _conv v=VAL(numstr$)LReturns the floating-point number corresponding to a numeric string numstr$.a .VECTOR _control)VECTOR i% label1, label2, ... labelN ENDV%Jumps to label number i% in the list. .WEEK .DOW _date8w%=WEEK(day%, month%, year%) d%=DOW(day%, month%, year%)\Return the week number (1-53) or day of week (1 Mon-7 Sun) on which the specified day falls. day% 1-31 month% 1-12 year% 1900-2155 .WHILE...ENDWH _control WHILE expression ... ENDWH Repeatedly performs the set of instructions between the WHILE and the ENDWH statement, as long as expression returns logical true. Character codes of special keys KEY CODE Delete 8 Tab 9 Enter 13 Esc 27 Up 256 Down 257 Right 258 Left 259 Pg Up 260 Pg Dn 261 Home 262 End 263 Menu 290 Help 291 Diamond 292"Psion key adds 512 to the keycode. Fonts Font ID Description Pixel Size 1 S3 normal 8 2 S3 bold 8 3 S3 digits 6 4 Mono 8 5 Roman 8 6 Roman 11 7 Roman 13 8 Roman 16 9 Swiss 8 10 Swiss 11 11 Swiss 13 12 Swiss 16 13 Mono 6 Precedence - (unary minus), NOT *, / +, - =, >, <, <>, >=, <= AND, OR