Appendix A: Summary for experienced OPL users
Appendix A: Summary for experienced OPL users
Chapter Contents
Introduction
OPL has evolved from the Psion Organiser II through the MC and HC computers to the Series 3 and the Series 3a and then to the Series 3c and Siena and to the Series 5. This appendix gives a summary of the changes made from the Series 3a upwards. For more details of the following topics and keywords, look them up in the index or table of contents.
Bear in mind that some OPL keywords return or allow different values according to screen size and keyboard layout.
Using OPL on the Series 3a, Series 3c and Siena
OPL on the Series 3c is similar to that on the Series 3a except for some differences with serial cables.
Again the Siena is similar to these two, except for the size of its screen being around half that of the other two and also the fact that it does not have an SSD.
Using OPL on the Series 5
The principal design requirements of OPL for the Series 5 were:
- Compatibility with earlier versions of OPL.
- Provision of a mechanism for language extensions to replace direct calls to the operating system.
- Generally to take advantage of the abilities of EPOC32.
The major difference between this and other versions of OPL is that 32-bit rather than 16-bit addressing is used. This means that the arguments and return values of quite a number of keywords have changed from being integers to long integers.
Also graphics, menus, dialogs and database handling especially have been improved to take advantage of the abilities of EPOC32.
Below the removed, new and changed features are listed. For this appendix to provide detailed information would represent a repetition of much of what has been described in the main chapters of this manual and you should refer to these for full details (especially useful is the Alphabetic Listing which includes full details of all keywords for both the Series 5 and the Series 3c).
The following keywords, available on earlier Psion machines (Series 3a, Series 3c and Siena), are no longer available on the Series 5:
- RECSIZE and COMPRESS. COMPACT replaces COMPRESS.
- gDRAWOBJECT.
- gINFO. This is replaced by gINFO32
- STATUSWIN, STATWININFO, DIAMINIT and DIAMPOS. The Series 5 has no status windows. Toolbars are used instead See the Toolbar Usage section in the Friendlier Interaction chapter.
- TYPE, PATH and EXT. These were provided on earlier machines for use by the System screen only. The Series 5 does not require this information. On the Series 5, applications do not have types, application-specific paths or filename extensions. An application and its associated documents are identified by a UID (unique identifier) instead. (A new command FLAGS has a similar function to TYPE.) See the Advanced Topics chapter.
- CMD$(4) and CMD$(5).
- SETNAME. The new SETDOC, serves a similar purpose, and should be called before saving your main document.
- Named Calculator memories and M0,...,M9. The Series 5 Calculator does not use OPL to evaluate expressions.
- CACHE, CACHETIDY, CACHEHDR and CACHEREC. On the Series 5 procedures are automatically cached.
- CREATESPRITE, APPENDSPRITE, CHANGESPRITE, DRAWSPRITE, POSSPRITE and CLOSESPRITE. Superior sprite-handling OPX functions are provided. See the Sprite and Bitmap OPX section in the Using OPXs on the Series 5 chapter.
- OS and CALL. The Series 5 provides extensibility using special OPL DLLs. See the Using OPXs on the Series 5 chapter.
- USR and USR$.
- ODBINFO. This is implementation specific.
- LOADLIB, LINKLIB, UNLOADLIB, FINDLIB, GETLIBH, NEWOBJ, NEWOBJH, SEND, ENTERSEND and ENTERSEND0. OPXs are now used for calling language extensions and creating object instances. See the Using OPXs on the Series 5 chapter.
The following keywords have been added to OPL on the Series 5:
- DECLARE EXTERNAL, EXTERNAL, INCLUDE and CONST allow the use of header files which include the definition of constants and procedure prototypes.
- mCASC and mPOPUP provide new menu features.
- dCHECKBOX and dEDITMULTI provide new features for dialogs.
- DAYSTODATE allows easy conversion of "days since 1/1/1990" to a date.
- gCOLOR, gCIRCLE, gELLIPSE and gSETPENWIDTH provide new graphics functionality.
- gINFO32 replaces gINFO.
- SETFLAGS and CLEARFLAGS allow for Series 3a/Series 3c/Siena compatibility
- IOWAITSTAT32.
Database commands:
- DELETE allows deletion of a table.
- INSERT, MODIFY, PUT and CANCEL allow the building up and editing of databases.
- BOOKMARK, KILLMARK, GOTOMARK support the use of bookmarks in databases.
- BEGINTRANS, COMMITTRANS, INTRANS and ROLLBACK support transactions in databases.
- COMPACT replaces COMPRESS.
OPL applications:
- CAPTION and FLAGS allow definition of OPL applications; FLAGS is similar to TYPE.
- SETDOC and GETDOC$ allow files to be created as documents.
- GETEVENT32, GETEVENTA32 and POINTERFILTER provide increased support for handling of events, including pointer (pen) events.
- Two other major additions have also been made to OPL. These are:
- Support for Toolbars (to replace status windows). See the Toolbar Usage section in the Friendlier Interaction chapter.
- Support for language extensions in separate EPOC32 DLLs called OPXs. See the Using OPXs on the Series 5 chapter.
The following keywords have undergone some changes, although many of these are compatible with earlier versions of OPL:
- ADDR, ALLOC, ADJUSTALLOC, REALLOC, LENALLOC and FREEALLOC
- APP and ICON
- CMD$(3)
- GETEVENT
- BUSY
- OFF
- SCREENINFO
- dBUTTONS, dCHOICE, dFILE, dINIT, dTEXT, dTIME and dXINPUT
- mCARD
- CLOSE, COUNT, CREATE, OPEN, POS and POSITION
- CURSOR, DEFAULTWIN, gBORDER, gBUTTON, gCLOCK, gCREATE, gCREATEBIT, gFONT, gGREY, gLINETO, gLINEBY, gLOADBIT, gSAVEBIT, gLOADFONT, gUNLOADFONT, gPEEKLINE and gXBORDER