Chapter Contents |
Previous |
Next |
MESSAGEBOX |
Category: | Utility |
Syntax | |
Details | |
Example |
Syntax |
text=MESSAGEBOX(textlist-id<,icon<,buttons
<,caption<,default<,right>>>>>); |
Enter
instead of selecting
a button, either default is returned (if specified) or the text
of the first button in the message window is returned.
Type: Character
Type: List
'I' |
Information or note icon (default) |
'?' |
Query icon |
'!' |
Warning icon |
'S' |
Error icon (stop sign/hand) |
'O' |
Ok (default) |
'OC' |
Ok Cancel |
'YN' |
Yes No |
'YNC' |
Yes No Cancel |
'ARI' |
Abort Retry Ignore |
'RC' |
Retry Cancel |
Type: Character
Type: Character
'N' |
Left justify the text. (default) |
'Y' |
Right justify the text. |
Details |
MESSAGEBOX calls a host message window and specifies text to be displayed there. It can also specify an icon, one or more buttons, and a title to display in the window.
If the message window cannot open, or if textlist-id is invalid, the program halts. Otherwise, MESSAGEBOX returns OK, CANCEL, ABORT, RETRY, IGNORE, YES, or NO. On hosts that allow users to close the message window without selecting a button, CANCEL is returned even if it is not one of the button choices.
Example |
Create a requestor window to prompt users to save the latest changes when they close an application window. If no button is selected to close the window, NO is returned to the variable COMMAND.
commandlist=makelist(); commandlist=insertc(commandlist, 'You have not saved the latest changes.',1); commandlist=insertc(commandlist, 'Do you want to save your changes?',2); ...more SCL statements... command=messagebox(commandlist,'!','YN',",'N',"); commandlist=dellist(commandlist);
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.