WRNBOX

Summary


Wrnbox declares a warning box.

Syntax

   [ Local ] Wrnbox list_exprg   [ Titled exp_titre ] Using variable Sleep lead-time

Parameters

Element

Description

Restrictions

list_exprg

List of generalised expressions separated by the character ','.

The expressions must be alphanumeric and the number is limited to 255.

exp_title

Alphanumeric expression for the box title.

length<= 50

variable

variable_name of the numeric type containing the value for return to the entry in the box.

The variable must exist.

lead-time

integer expression expressing a lead-time.

lead-time >=0

Examples

# Display of a warning message that a file will be returned to zero.
   # This operation is carried out if there is a confirmation operation
    Local Label REP
   
Wrnbox mess(1, 10, 1) Using [L]REP
    Case [L]REP
       When 1 : Lock [CLI]
                If fstat = 0 : Delete [CLI]CODCLE >= "" : Endif
    Endcase

Description and comments

Wrnbox is used to declare a box for the display of a warning message with the entry of a button requesting the confirmation or abandoning of an operation ( the texts for the buttons are "OK" and "Cancel").

The Wrnbox instruction contains as first argument the text for the message to be displayed. It is given under the form of an alphanumeric expression list, each element of the list is made up of a line of text. If one of the variable expressions
sized without specifying an index or index interval, all the elements of the variable are used. The specifying of an index or index interval determines the elements to be taken into account. If an index interval is given such that no corresponding element exists, for example TEXT(1..0), the box will not be displayed.

A given text with a number lines that is too great for the size of the screen will be truncated.

It is then possible to give a group of optional clauses :

The clause Titled is used to give a title to the warning box, that differs from the standard title.

The clause Using is used to assign the variable where the name follows with the value of the button entered. The clause Sleep is used to express the maximum wait time for the entry of the response. This is a time expressed in number of seconds. In time-out, the system exits the window with the activation of button n°1, or else the button defined by default (that is to say that defined before opening this box).

Remarks

The warning boxes are closed one the choice is made between "OK" or "Cancel" or on time-out. The selection box are closed once the choice is made. The Close instruction does not exist for a Wrnbox .

Associated errors

Error

Description

ERMODE (10)

- The variable for the clause Using is not numeric.
- The expressions are not alphanumeric.
- the given indexes are not numeric.

ERINDI ( 8)

Error in the index ranges.

ERDIM (55)

Too many dimensions given.

PLUMEM (31)

No more memory available.

Associated keywords

Inpbox - Dlgbox - Mesbox - Errbox - Infbox - Qstbox - Selbox - Status - Endbox


SUMMARY


Copyright © Sage 1999 - 2007