That which is normally referred to as the Taurus OPL Library, namely the psion.opl Java library and opllib C library are (C) Copyright Taurus Software, 1999. This is separate software (used to support the opl2java runtime) and is NOT bound by the GNU Public Licence.
Taurus opl2java Translator is a trademark of Taurus Software. Java is a trademark or registered trademark of Sun Microsystems, Inc. All other product names mentioned herein are the trademarks of their respective owners.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRIGEMENT. TAURUS SOFTWARE ACCEPTS NO RESPONSIBILTY FOR ANY DAMANGE, OF ANY KIND, CAUSED BY THE USE, OR MIS-USE OF THIS SOFTWARE. BY USING THIS SOFTWARE YOU AGREE TO THE LICENCING TERMS HEREIN.
TAURUS SOFTWARE RESERVES THE RIGHT TO REVOKE THIS LICENCE AT ANY TIME, FOR ANY REASON. THE "FREE" STATUS OF THIS SOFTWARE IS TEMPORARY, DUE TO THE TIME AND EFFORT DEVOTED TO THIS PROJECT IT IS LIKELY TO BECOME "SHAREWARE", BUT IS UNLIKELY TO BE MADE INTO A COMMERCIAL PRODUCT.
All references to Taurus Software directly refer to the non-profit freeware/shareware software development unit run from the UK by myself. Any conflict with names of companies inside or outside of the UK is unintentional and should be disregarded.
opl2java -Mj -V -x example.opl
This will produce a file called example.java, containing a single Java class called "example". To compile this, you will need "javac" in you path and the opl2java directory in your classpath (the directory above the psion directory for the psion.opl library). You can now javac the file in the normal way, or do a one step translate and compile:
opl2java -Mj -V example.opl
opl2java will invoke the Java compiler for you.
The resulting class file can then be executed.
A similar process is used to create applets, but instead specify -MJ. The
applet can be run by creating a HTML file with an <applet>
tag. This can then be tested with "appletviewer".
If your application uses any resource files (e.g. PIC files), then these can be placed in a ZIP file and downloaded in one go when the applet starts up. You need to specify the ZIP file in your applet tag:
<applet code="patience.class" width=480 height=160> <param name="ResourceZIPFile" value="patience.zip"> </applet>This will speed up the running of the application over the Internet. Another use for this technique is for websites that only allow certain file extensions to be uploaded (.PIC not being one of them).
APP AND BUSY CHR$ DEFAULTWIN DO ELSE ELSEIF ENDA ENDP ENDIF ENDWH EXIT FONT gAT gBOX gCLOSE gCLS gCOPY gCREATE GETEVENT GIPRINT gLINEBY gLOADBIT GLOBAL gFILL gFONT gGREY gMOVE gPRINT gSTYLE gTMODE gUSE IF LOCAL mCARD MENU mINIT NUM$ OFF ON OR PRINT PROC RANDOMIZE RETURN RND SECOND STATUSWIN UNTIL WHILE
The OPL language syntax (IFs, WHILEs etc) is pretty much complete and most of the simple OPL functions (e.g. gCREATE) and procedures (e.g. gUSE) are implemented in some form or other. The latter are implemented in a separate library, so can be upgraded independantly of the translator. Further keywords can be added to the translator by simple modification of the lexer.
Currently the translator supports the following language options:
j
- Java applications for use with JDK 1.1.x upwards
J
- Java applets for use with JDK 1.1.x upwards
c
- RISCOS C for use with the Acorn Archimedes range of machines
Missing features, bugs etc. will be fixed as part of the development procedure, so keep checking the website for updates.