PreviousNextIndex

CLEAR statement

Clears the data for all fill-in fields in a frame. It also clears the colors for all widgets in a frame, except for enabled fill-ins.

Note: Does not apply to SpeedScript programming.
Syntax

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

FRAME frame
ALL
NO-PAUSE
Example

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

r-clear.p
DEFINE VARIABLE a AS CHARACTER NO-UNDO INITIAL "xxxxxxxx". 
DEFINE VARIABLE b AS DATE      NO-UNDO INITIAL TODAY. 
DEFINE VARIABLE c AS DECIMAL   NO-UNDO INITIAL "-12,345.67". 
DEFINE VARIABLE d AS INTEGER   NO-UNDO INITIAL "-1,234,567". 
DEFINE VARIABLE e AS LOGICAL   NO-UNDO INITIAL TRUE. 
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

OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex