Thursday 23 April 2015

Use Opl

Many Nokia cell phones run Symbian OS.


As computer literacy grows in our society, programming language has ceased to be the sole domain of sophisticated experts, with many casual programmers taking it up as a hobby. Of the many different programming languages, OPL is one of the most popular. OPL language is based on the classic BASIC language, and was developed specifically for cell phones running the Symbian OS, such as Nokia or Sony Ericsson. Once you've downloaded the SDK (software development kit), here are some steps to help you start using your OPL software.


Instructions


1. Register with the Symbian Developer Network. The network carries official developer information, updates and tutorials for OPL-based software. Registering with the network will allow you to access information to optimize your OPL use.


2. Open the OPL emulator on your hardware. Writing applications and programs from OPL language requires trial and error, so play around to learn what works.


3. Write a basic program. This step will help you write a program that displays the message "Hello" on your monitor or screen. Write the following code into the OPL emulator: proc print:/print "Hello"/get/endp. (Do not type the forward slashes or period. The forward slashes indicate where you should skip to the next line.) Start the program. The text "Hello" should display on the screen.


4. Write a program that requires input. Open the OPL emulator and type the following code: proc input:/local a$(15)/print "What's your name?"/input a$/print "Hi", a$/get/endp. (Again, the forward slashes indicate that you should go to the next line.) Run the program. A screen will appear asking you "What's your name?" There will be a space for you to type an answer. Type your name. The program will respond with "Hi, (your name)." In this program, the value "a$" is the variable. The number 15 corresponds to how many characters the variable can hold. When using a variable, you need to begin by declaring it as a "local" or "global" variable. In this program, the variable is local, meaning it is limited to just this program.


5. At this point, you've gained a basic understanding of how OPL programming should work. What remains now is to learn the language to increase your programming ability. OPL programming books exist, but can be expensive. Check your local library to see if you can find any titles on OPL or a similar language. A variety of websites will contain other basic OPL programming code to help you learn the language while writing other programs.

Tags: your name, forward slashes, this program, cell phones, following code