PreviousNextIndex

PUT SCREEN statement


(Character only)

Displays a character expression at a specified location on a screen, overlaying any other data that might be displayed at that location.

This statement is supported only for backward compatibility.

Note: Does not apply to SpeedScript programming.
Syntax

PUT SCREEN 
  [ ATTR-SPACE | NO-ATTR-SPACE ] 
  [ COLOR color-phrase ]  
  [ COLUMN expression ] 
  [ ROW expression ] 
  expression 

ATTR-SPACE | NO-ATTR-SPACE
COLOR color-phrase
COLUMN expression
ROW expression
expression
Example

The r-putscr.p procedure determines whether a Customer’s current balance is above or below 0. If it is above 0, they have a credit; if it is below 0, they owe money. The label of the balance column is changed based on whether they have a credit or owe money.

r-putscr.p
DEFINE VARIABLE paid-owed AS DECIMAL   NO-UNDO. 
DEFINE VARIABLE bal-label AS CHARACTER NO-UNDO FORMAT "x(20)". 
FOR EACH Customer NO-LOCK: 
  paid-owed = Customer.Balance. 
  IF paid-owed < 0 /* Customer has a credit */ THEN DO: 
    paid-owed = - paid-owed. 
    bal-label = "Customer Credit". 
  END. 
  ELSE bal-label = "Unpaid balance". 
  DISPLAY Customer.CustNum Customer.Name paid-owed LABEL " " WITH 1 DOWN. 
  IF Customer.Balance < 0 THEN 
    PUT SCREEN COLOR MESSAGES ROW 2 COLUMN 34 bal-label. 
  ELSE  
    PUT SCREEN ROW 2 COLUMN 34 bal-label. 
END. 

If the Customer has a credit (balance < 0) the first PUT SCREEN statement displays the value of bal-label (which is Customer Credit) in the same color as you see system MESSAGES (usually reverse video).

If the Customer owes money (balance > 0) the second PUT SCREEN statement displays the value of bal-label (which is Current Balance) in normal display mode.

Notes
See also

COLOR phrase, DISPLAY statement, HIDE statement, PUT statement


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex