@CREATE_WINDOW

@CREATE_WINDOW creates a new window and returns a window ID assigned to that window.  This assigned window ID should be stored in a meaningful variable name; all subsequent operations with the new window must use this window ID.  Initially, the newly-created window contains blanks and the cursor is positioned at row 1, column 1 of the window.

The created window remains throughout the entire ACCENT R session unless deleted by one of the following methods:

A window is not deleted by exiting a Process Module (PM) or Command Module (CM), even if the assigned window ID is no longer available.  If the window ID is unknown, SCREEN KILL_SCREEN can be used to delete the window.

RETURNS

@CREATE_WINDOW returns a non-zero integer value representing the newly created window.  If this window ID is stored globally (such as in a Global Storage), the window can be referenced throughout the entire ACCENT R session.

SYNTAX

@CREATE_WINDOW (number_of_rows number_of_columns window_attributes rendition)

number_of_rows

is an integer expression that specifies the number of rows in the newly created window.  This value does not include the two extra rows required for a border.

number_of_columns

is an integer expression that specifies the number of columns in the newly created window.  This value does not include the two extra columns required for a border.

window_attributes

specify special window characteristics such as borders, truncation icons, and control character display.  More than one attribute may be specified by separating the attributes with plus signs.

 

The valid window attributes are:

  • @NORMAL specifies no special window attributes should be used.  [default setting]
  • @BORDER specifies a border for the window.
  • @TRUNC_ICON specifies an icon is displayed where truncation has occurred as a result of exceeding the dimensions of the window.
  • @WINDOW_CTRL specifies that control characters such as a Return and Linefeed are displayed as characters (<CR> and <LF>) so that they can easily be seen.

rendition

defines the default video attributes of the window.  More than one video attribute may be specified by separating the attributes with plus signs.

 

The valid video attributes are:

  • NORMAL specifies normal video attribute. [Default setting]
  • BLINK specifies blinking video attribute.
  • BOLD specifies bold face video attribute.
  • REVERSE specifies reverse video attribute.
  • UNDERLINE specifies underlining video attribute.

EXAMPLE

IF:10 (HELP_ID EQ 0)
      @CREATE_WINDOW(22 78 BORDER NORMAL) &
     TO HELP_ID
CONTINUE:10

This example demonstrates the creation of a window.  Since the window ID is never zero, it is easy to determine if the window has already been created.  The new window will have 22 rows and 78 columns.  It will have a border with a normal default rendition.  The window will actually occupy 24 rows and 80 columns with the border.

Back to System Functions-Window Control Tools    Next page @GET_COLUMN