# CLEARP

Syntax:

Then: CLEARP

Version Ref: 4.1

Description:

This command removes a popup and cleans up the screen. It is a good idea to always use this command after a popup.

Examples:

Then: end
@keyV If:
Then: lookup cust = customer k=2 i=a -nx
If: not cust
Then: errorbox "Customer Not On File!" ; end
Then: popup cust,"bal" ; show "@" ; clearp ; end

The above code puts screen "bal" from the "customer" file on the screen and keeps it there until the user presses ENTER (the show "@" does this). Once ENTER is pressed, the CLEARP command clears the popup from the screen.

NOTES: The ERRORBOX in the above code clears itself from the screen when the user presses ENTER. This is the nature of how ERRORBOX works, but not so with POPUP.

The quotes are necessary around the screen name "bal", but there are no quotes needed around the filename (or filename alias) in the POPUP command. If a single character screen name is used, no quotes are required. You can substitute a screen name that is contained in a variable by enclosing the variable in parentheses.

If:
Then: aa="test"
If:
Then: popup -,(aa) ; show "@" ; clearp ; end

The above code will display screen "test" in the current file.