HP Forums

Full Version: FREEZE instruction
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here's the code;
TEXTOUT("1: Var1 ",-15,9);
TEXTOUT("1: Var2 ",-15,7);
TEXTOUT("1: Var3 ",-15,5);

FREEZE definition;
Pauses program execution until a key is pressed. This
prevents the screen from being redrawn after the end of
the program execution, leaving the modified display on
the screen for the user to see.

Well... It does appear to FREEZE the screen, After it prints all 3 vars. If I put WAIT(0) in the code, it waits at var 1, then prints var2 and var3 and then FREEZE's?. I'm somewhat confused. Is this the intended behavior of the FREEZE instruction?
It is used to prevent the system from updating the display, generally after the program finishes. FREEZE does not halt the program, so using FREEZE multiple times in a program does not really make much sense. When most programs on the Prime finish, we are generally shown a popup window of either the value returned by the program, or the value of the last command issued just as the program ends. This screen, of course, updates the display. So if you have a nice image you want to remain on the screen after the program is done, use FREEZE to prevent the system's internal display routines from refreshing the screen.
Another catch with FREEZE is that if there is an error in your program after the FREEZE, you will not see the error message.
Reference URL's