The HP48 Homepage  
 

 
News My Programs Software Programming Articles Links Sitemap Search Feedback    
   
 

Programming in User RPL - Displaying output

In this last page of the tutorial, you'll learn how to display the output of your programs in a nice way. Because if your program has a nice way to enter the input, like the ones which you saw on last page, it should also have a nice way to display the output.

MSGBOX: Displaying Message Boxes

The command MSGBOX takes only one argument: a string. It displays that string in a nice message box. The message box has at least two line, so if your text is very short, there will be a blank line. You may enter line breaks, if you don't, the text will be wrapped automatically.

Producing Sounds

To make the HP produce a sound, use the BEEP command. If the beep has been deactivated, then the beep will not be produced. The command takes two arguments: on level two, the frequency of the sound, in Hz. On level one, the duration. Then, it beeps.

Displaying Text Strings

DISP is the command used to display strings on the screen. It takes a string (or any other object, which will be converted to a string) and the line number (from one to seven) from the stack, and displays. You may include line breaks in the string, this way you may display more than one line each time. Only ths line(s) where the text will be displayed are cleared.

Using FREEZE

If you tried DISP (if you haven't, try it now), you noticed that the text only remains in the display for a very short time. To help this, we have FREEZE. It takes one parameter: the are to freeze. That area(s) are not updated until a key is pressed. The numbers are as follows:

NumberArea(s) frozen
1Status area
2Stack
3Status and stack
4Menu
5Menu and status area
6Menu and stack
0 or 7Whole display

Clearing the Display

And the last command of this subject and of this tutorial is CLLCD. OK, I should have finished with a big command, with many arguments, etc., but CLLCD is very simple. It takes no arguments, returns no results, and clears the whole screen. The stack, or PICT aren't actually cleared, only the display. It is normally used before DISP.




Previous Page

 
 

This page was created by Eduardo M Kalinowski