ArticleslgStudy

computer science

Open Programming Language

Open Programming Language is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Open Programming Language rather than just read about it. In short: Open Programming Language (OPL) is a programming language for embedded systems and mobile devices that run the operating systems EPOC and Symbian. It was released by the British company Psion in 1984.

Key takeaways

  • Open Programming Language belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Open Programming Language to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Open Programming Language from memory before moving on to harder problems.

Reference excerpt

Open Programming Language (OPL) is a programming language for embedded systems and mobile devices that run the operating systems EPOC and Symbian. It was released by the British company Psion in 1984.

Use Originally designed for use on their classic Psion PDAs such as the Series 3, 5/5mx, Series 7, and netBook–netPad, and the Psion produced MC218, OPL was provided as part of the standard application suite. It can also be installed on the Nokia 9200, 9300 and 9500 Communicator series mobile telephone and personal digital assistant (PDA) and the Sony Ericsson P800, P900, 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 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 packs. 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 for S60 instead (See Python for S60).

Examples Here is the console version of a "Hello, World!" program:

PROC main: PRINT "Hello World!" PAUSE 40 ENDP

(Source code taken from the PCDevPrimer in the OPL Wiki.) 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 (subroutines) 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:

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 var.

Minutiae OPL interfaced with advanced Psion Series 3 features by means of operating system CALLs, but in the later Psion Series 5mx this was changed to a so-called OPX 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: g for graphical functions, m for menus, and d for dialogs.

See also Psion Organiser Symbian

References

External links The opl-dev project OPL wiki on Internet Archive containing documents detailing OPL keywords, OPX interfaces and much other information OPL Blog by Symbian, now dead, but old versions are available from the Internet Archive Russian site about OPL Archived 6 December 2006 at the Wayback Machine OPL programming tutorial

Worked examples

Example 1 — a first encounter with Open Programming Language

Start with the simplest possible case. Write down what Open Programming Language claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Open Programming Language before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Open Programming Language ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Open Programming Language

In research
Open Programming Language appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Open Programming Language in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Open Programming Language is common in secondary-school and first-year university syllabi. It links to neighbouring topics BASIC programming language family, Computer-related introductions in 1984, Embedded systems, so understanding it makes those chapters shorter.
In everyday life
Look for Open Programming Language outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Open Programming Language” →

How to study Open Programming Language in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Open Programming Language means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Open Programming Language out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Open Programming Language in simple terms?

Open Programming Language (OPL) is a programming language for embedded systems and mobile devices that run the operating systems EPOC and Symbian. It was released by the British company Psion in 1984.

Why does Open Programming Language matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Open Programming Language?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Open Programming Language.

Tags

  • BASIC programming language family
  • Computer-related introductions in 1984
  • Embedded systems
  • Free mobile software
  • Procedural programming languages
  • Software using the GNU Lesser General Public License
  • Symbian OS

Keep exploring