Navigation

Operators and Keywords

Function List:

C++ API

Function File: h = warndlg (msg)
Function File: h = warndlg (msg, title)
Function File: h = warndlg (msg, title, createmode)

Display msg using a warning dialog box.

The message may have multiple lines separated by newline characters ("\n"), or it may be a cellstr array with one element for each line.

The optional input title (character string) can be used to set the dialog caption. The default title is "Warning Dialog".

The return value is always 1.

Compatibility Note: The optional argument createmode is accepted for MATLAB compatibility, but is not implemented.

See also: helpdlg, inputdlg, listdlg, questdlg.

Demonstration 1

The following code

 disp ('- test warndlg with prompt only.');
 warndlg ('Oh, a warning occured');

Produces the following output

- test warndlg with prompt only.

Demonstration 2

The following code

 disp ('- test warndlg with prompt and caption.');
 warndlg ('Oh, No...','This is the last Warning');

Produces the following output

- test warndlg with prompt and caption.

Package: octave