Progress
Language Reference


CLEAR Statement

Interfaces
OS
SpeedScript
All
All
No

Clears the data and colors (and side labels for a down frame) for all fill-in fields in a frame.

SYNTAX

CLEAR [ FRAME frame ] [ ALL ] [ NO-PAUSE ] 

FRAME frame

Represents the name of the frame containing the fill-in fields you want to clear. If you do not name a frame, CLEAR clears the default frame for the block containing the CLEAR statement.

ALL

Clears all occurrences and resets the current display position to the top of the frame for a down frame (a frame used to display several occurrences of the fields in the frame).

NO-PAUSE

Does not pause before clearing the frame.

EXAMPLE

The r-clear.p procedure displays the Progress data types and their corresponding default formats. The procedure prompts you to enter values so you can see how Progress formats those values. If you answer YES, Progress clears the values currently displayed so that you can enter new values.

r-clear.p
DEFINE VARIABLE a AS CHARACTER INITIAL "xxxxxxxx".
DEFINE VARIABLE b AS DATE INITIAL TODAY.
DEFINE VARIABLE c AS DECIMAL INITIAL "-12,345.67".
DEFINE VARIABLE d AS INTEGER INITIAL "-1,234,567".
DEFINE VARIABLE e AS LOGICAL INITIAL yes.

DISPLAY "This illustrates the default formats for the
  different data types" SKIP (2) WITH CENTERED
  ROW 4 NO-BOX FRAME head.
FORM "CHARACTER default format is ""x(8)""    " a SKIP
  "DATE default format is 99/99/99         " b SKIP
  "DECIMAL default format is ->>,>>9.99    " c SKIP
  "INTEGER default format is ->,>>>,>>9    " d SKIP
  "LOGICAL default format is yes/no        " e TO 55 SKIP
  WITH ROW 8 NO-BOX NO-LABELS CENTERED FRAME ex.
REPEAT:
  DISPLAY a b c d WITH FRAME ex.
  MESSAGE "Do you want to put in some values?"
  UPDATE e.
  IF e THEN DO:
    CLEAR FRAME ex NO-PAUSE.
    SET a b c d WITH FRAME ex.
  END.
  ELSE LEAVE.
END. 

NOTES


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095