MESSAGECOLOR color-phraseexpression SKIP ( n )VIEW-AS ALERT-BOXalert-typeBUTTONS button-setTITLE title-stringSET UPDATE fieldAS datatype LIKE fieldFORMAT stringAUTO-RETURNIN WINDOW windowCOLOR color-phrase
NORMALINPUT
MESSAGES
protermcap-attributedos-hex-attributefgnd-color bgnd-colorBLINK- BRIGHT-BLINK- RVV- UNDERLINE- BRIGHT-fgnd-colorexpression )VALUE (An expression (a constant, field name, variable name, or expression) whose value you want to display in the message area. If expression is not character, it is converted to character before it is displayed. If you do not use this option, you must use either the SET or UPDATE option.SKIP ( n )Indicates a number (n) of blank lines to insert into the message. The value of n can be 0. If you do not specify n, or if n is 0, a new line is started unless the current position is already the start of a new line.VIEW-AS ALERT-BOX alert-typeSpecifies that the message is displayed in an alert box rather than in the window message area. The value of alert-type determines the type of alert box. The possible values are:BUTTONS button-setTITLE title-stringSET fieldDisplays the expression you specified and SETs the field or variable you name. (It prompts the user for input and assigns the value entered to the field or variable.) You cannot test the field with the ENTERED function or the NOT ENTERED function.UPDATE fieldDisplays the expression you specified and updates the field or variable you name. (It displays the current value of the field or variable, prompts for input, and assigns the value entered in the field or variable.) You cannot test the field with the ENTERED function or the NOT ENTERED function. For an alert box, field must be a LOGICAL variable. It sets the default button and returns the user’s choice. If the alert box has two buttons, they represent the values TRUE and FALSE, respectively. If the alert box has three buttons, they represent the values TRUE, FALSE, and the Unknown value (?), respectively.AS datatypeDefines field as a variable of type datatype. You must use this option or the LIKE option if field has not been previously defined.LIKE fieldFORMAT stringThe format that you want to use to display the field used in the SET or UPDATE option.For more information on display formats, see OpenEdge Getting Started: ABL Essentials.
Table 45: Table 46 shows the default formats for the Other expression.
Table 46: CLASS1 HANDLE2
For a class instance, ABL automatically invokes the ToString( ) method (provided by the Progress.Lang.Object class) on the object reference. Instead, you can also first explicitly convert the object reference to a displayable type using the INT64 function, the INTEGER function, or the STRING function.
You cannot display a MEMPTR, RAW, or ROWID value directly. However, you can convert it to a character string representation using the STRING function and display the result. A ROWID value converts to a hexadecimal string, "0xhexdigits", where hexdigits is any number of characters "0" through "9" and "A" through "F". A MEMPTR or RAW value converts to decimal integer string.
IN WINDOW windowIn this procedure, if you enter the number of a Customer that does not exist, the procedure displays a message telling you the Customer does not exist. If the Customer does exist, the procedure displays the Name and SalesRep of the Customer.
REPEAT:PROMPT-FOR Customer.CustNum.FIND Customer USING Customer.CustNum NO-ERROR.IF NOT AVAILABLE Customer THEN DO:MESSAGE "Customer with CustNum " INPUT Customer.CustNum" does not exist. Please try another".
UNDO, RETRY.END.ELSEDISPLAY Customer.Name Customer.SalesRep.END.In r-altbox.p, each time you select an item from the selection list, the procedure displays an alert box to ask if you want to delete the customer. If you choose the No button, then another alert box informs you that the record was not deleted.If you want to send output to a destination other than the terminal, and you do not want messages to appear on the terminal (and if you are not using the terminal as an input source), use one of the statements in Table 47.
Table 47:
Valexp: name BEGINS "a"
MESSAGE UPDATE name
DEFINE VARIABLE myvar AS CHARACTER NO-UNDO FORMAT "x(60)".MESSAGE "abcdefghijklmnopqrstuvwxyz" UPDATE myvar.
DEFINE VARIABLE amt AS DECIMAL NO-UNDO FORMAT ">>9.99" INITIAL 1.20.MESSAGE "Total" amt.
"Total 1.2"
For SpeedScript, the only valid options are: expression and SKIP.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |