Progress
Language Reference


UP Statement

Interfaces
OS
SpeedScript
All
All
No

Positions the cursor on a new line in a down or multi-line frame.

When the block specifying the down frame iterates, Progress automatically advances one frame line. Use the UP statement if you want to move to a different display line at any time.

For more information on down frames, see the DOWN option of the Frame Phrase.

SYNTAX

UP [ STREAM stream ] [ expression ] [ frame-phrase ] 

STREAM stream

Specifies the name of a stream. If you do not name a stream, Progress uses the unnamed stream. See the DEFINE STREAM Statement reference entry in this book and the chapter on alternate I/O sources in the Progress Programming Handbook for more information on streams.

expression

Represents the number of occurrences of data in the frame that you want to move up. UP is the same as UP 1, except that nothing happens until the next data handling statement affects the screen. Several UP statements in a row with no intervening displays are treated like a single UP 1. UP 0 does nothing. If expression is negative, the result is the same as a DOWN expression.

frame-phrase

Specifies the overall layout and processing properties of a frame. For more information on frame-phrase, see the Frame Phrase reference entry.

EXAMPLE

This procedure starts at the bottom of the screen and displays all the customer database records. The default frame for the FOR EACH block is a down frame. The DISPLAY statement uses that frame. Therefore, Progress automatically advances down the screen one line after each iteration. You must use an UP 2 rather than an UP 1 because there is an automatic DOWN 1 performed on the display frame at the end of each iteration of the FOR EACH block.

r-up.p
FOR EACH customer:
  UP 2.
  DISPLAY cust-num name city.
END. 

NOTES

SEE ALSO

DEFINE STREAM Statement, DOWN Statement, Frame Phrase, SCROLL Statement


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