Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Open Programming Language
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Programming language}} {{Multiple issues| {{More footnotes needed|date=May 2018}} {{Lead too short|date=January 2021}} }} {{Use dmy dates|date=May 2022}} {{Use British English|date=February 2022}} {{Infobox programming language | name = Open Programming Language (OPL) | logo = | paradigms = [[Imperative programming|imperative]], [[Structured programming|structured]], [[Embedded system|embedded]] | family = [[BASIC]] | designers = Colly Myers, Richard Harrison, Martin Stamp | developers = [[Psion (company)|Psion Ltd]]<br/>opl-dev project | released = {{Start date and age|1984}}<!-- If known, add |mm|dd|df=yes --> | latest release version = 1.56 | latest release date = {{Start date and age|2006|06|17|df=yes}} | typing = [[Static type|Static]], [[Strong and weak typing|strong]] | scope = [[Scope (computer science)|Lexical]] | implementations = | dialects = | influenced by = | influenced = | operating system = [[EPOC (operating system)|EPOC]], [[Symbian]] OS, [[Psion Organiser]] | license = [[GNU Lesser Public License]]<ref>[http://opl-dev.sourceforge.net/lgpl.txt License]</ref> | website = {{URL|opl-dev.sourceforge.net}} | file ext = }} '''Open Programming Language''' ('''OPL''') is a [[programming language]] for [[embedded system]]s and [[mobile device]]s that run the [[operating system]]s [[EPOC (operating system)|EPOC]] and [[Symbian]]. It was released by the British company [[Psion (company)|Psion]] in 1984. ==Use== Originally designed for use on their classic [[Psion (company)|Psion]] PDAs such as the [[Psion Series 3|Series 3]], [[Psion Series 5|5/5mx]], [[Psion Series 7|Series 7]], and [[Psion netBook|netBook]]–netPad, and the Psion produced [[Ericsson MC218|MC218]], OPL was provided as part of the standard application suite. It can also be installed on the [[Nokia]] 9200, [[Nokia 9300|9300]] and [[Nokia 9500|9500]] Communicator series [[mobile telephone]] and [[personal digital assistant]] (PDA) and the [[Sony Ericsson]] [[Sony Ericsson P800|P800]], [[Sony Ericsson P900|P900]], [[Sony Ericsson P910|P910]] series. OPL is also included in Psion Teklogix industrial handhelds such as the Workabout mx, and it also appeared in the lesser known Oregon 'Osaris' organiser, a broadly compatible EPOC32 device that uniquely used version 4 of the OS. OPL is an [[interpreted language]] similar to [[BASIC]]. A fully [[Visual Basic]]-compatible language OVAL has also been developed. ==History== The language was originally named ''Organiser Programming Language'', developed by [[Psion (company)|Psion Ltd]] for the [[Psion Organiser]]. Designed by Colly Myers with the first iteration implemented by Richard Harrison and Martin Stamp. The first implementation (without graphics) was for the original Psion Organiser (now referred to as the Psion Organiser I, 1984), and it came bundled with the Science, Finance and Math [[data pack]]s. It became truly accessible as built-in software in the [[Psion Organiser II]] (1986), and the language went on to be used in the [[Psion Series 3]] and later. After Psion retired from the [[personal digital assistant]] market, a project aiming to bring OPL to Symbian came to fruition, when the fledgling Symbian Developer Program released it as [[open-source software]]. The language is now available on [[SourceForge]] in a project named ''opl-dev''. The language is currently unavailable for Symbian OS v8 and later. With the subsequent retirement of the Symbian OS, it seems unlikely OPL will be made available for later generations of Symbian devices. As of 2010, Nokia device developers were encouraged to use [[Python (programming language)|Python]] for S60 instead (See [[Python for S60]]).{{Citation needed|date=October 2013}} ==Examples== Here is the console version of a [["Hello, World!" program]]: PROC main: PRINT "Hello World!" PAUSE 40 ENDP <small>''(Source code taken from the PCDevPrimer in the OPL Wiki.)''</small> And here is a GUI version for Nokia's Series 80 user interface: CONST KKeyEnter%=13 PROC hello: dINIT "Hello" dTEXT "","Hello World!" dBUTTONS "OK",KKeyEnter% DIALOG ENDP OPL is a [[structured programming]] language. OPL programs contain PROCedures, which are much like functions ([[subroutine]]s) in other programming languages. * The dINIT keyword in this example initializes a dialog box (intuitively enough, all dialog-box related functions begin with a letter 'd'; for clarity, this letter is in lower case, but the language is case independent). The first argument of the dialog is an optional string, which is used for the title of the dialog, displayed in the title bar. * The dTEXT function displays text, with two compulsory arguments: a left-aligned 'prompt' string, and a main string. * The dBUTTONS keyword allows you to put buttons on the dialog box - here there is a button with the text "OK". The second argument to each button is both the special notation of the shortcut key for that button and the dialog's return code, in this case the "Enter" key. * Finally, the DIALOG keyword is required for the previously initialized dialog box to be shown on the screen. ===Testing dialog responses=== An example: <syntaxhighlight lang="basic"> PROC test: dINIT "Your Challenge" dTEXT "","Will your answer to this question be no?" dBUTTONS "Yes",%y,"No",%n IF DIALOG=%y PRINT "No it wasn't!" ELSE PRINT "Yes it was!" ENDIF GET ENDP </syntaxhighlight> In this cruel interrogative program, the Yes button is assigned the shortcut of Ctrl+y, while No has Ctrl+n, represented by %y and %n respectively. The user's input from the DIALOG is tested in the IF statement, PRINTing appropriate responses to the screen. Note that the 'GET' keyword, which gets user input without using a dialog box, is here used simply to wait for a keypress before terminating the program (otherwise it would end immediately without giving time for the user to read the text). The output from DIALOG can also be stored in a variable. Variables specific to a procedure must be declared with the LOCAL keyword; global variables are defined with the GLOBAL keyword. ===Variable types=== The table below uses an example variable named <code>var</code>. {| class="wikitable" |----- ! [[Data type]] ! [[Syntax (programming languages)|Syntax]] |----- | Floating point || var |----- | Integer || var% |----- | Long integer || var& |----- | String || var$(''length'') |} ==Minutiae== OPL interfaced with advanced Psion Series 3 features by means of [[operating system]] CALLs, but in the later [[Psion Series 5]]mx this was changed to a so-called <code>OPX</code> [[Library (computing)|library]], stored in the system [[read-only memory]] (ROM), termed the Z drive. 'OPX' libraries were also made available for the [[Nokia 9210]], [[Nokia 9300]] and [[Nokia 9500]] Communicators, adding OPXs routines for handling Short Message Service ([[SMS]]) and managing [[Bluetooth]] communication. Other OPL features include those starting with a letter: <code>g</code> for graphical functions, <code>m</code> for menus, and <code>d</code> for dialogs. ==See also== *[[Psion Organiser]] *[[Symbian]] ==References== {{Reflist}} ==External links== *[http://opl-dev.sourceforge.net The ''opl-dev'' project] *[https://web.archive.org/web/20081119150450/http://www.allaboutopl.com/wiki OPL wiki] on [[Internet Archive]] containing documents detailing OPL keywords, OPX interfaces and much other information <!-- (opl-dev links to the live version of this, but it is now dead and taken over by an advertising site; this link is the last "good" version on the archive) --> *[http://www.symbiandiaries.com/opl/ OPL Blog by Symbian], now dead, but [https://web.archive.org/web/*/http://www.symbiandiaries.com/opl/ old versions are available] from the [[Internet Archive]] *[http://www.mobilab.ru/articles/index2.php?cat=6 Russian site about OPL] {{Webarchive|url=https://web.archive.org/web/20061206035423/http://www.mobilab.ru/articles/index2.php?cat=6 |date=6 December 2006 }} *[http://www.symbioosi.net/English/opl-programming.html OPL programming tutorial] {{Psion–Symbian}} {{BASIC}} [[Category:Embedded systems]] [[Category:Free mobile software]] [[Category:Symbian OS]] [[Category:Procedural programming languages]] [[Category:BASIC programming language family]] [[Category:Software using the GNU Lesser General Public License]] [[Category:Computer-related introductions in 1984]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:BASIC
(
edit
)
Template:Citation needed
(
edit
)
Template:Infobox programming language
(
edit
)
Template:Multiple issues
(
edit
)
Template:Psion–Symbian
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Use British English
(
edit
)
Template:Use dmy dates
(
edit
)
Template:Webarchive
(
edit
)