warndlg
Displays a dialog box with the warning s.
Syntax
warndlg(s)
R = warndlg(s, c)
R = warndlg(s, c, dummyarg)
Inputs
- s
- Content to display in the dialog. String inputs can have the '\n' newline character, which are displayed on separate lines of the dialog. String elements of cell inputs will be displayed on new lines in the dialog.
- c (optional)
- The caption to be displayed for the dialog. If no caption is specified, the caption displayed will be 'Warning'.
- dummyarg (optional)
- Dummy argument for compatibility with legacy scripts.
Outputs
- R
- Type: integer
Examples
R = warndlg('This is a warning!!!')
R = 1
Content displayed in the dialog is 'This is a warning!!!'
R = warndlg('Warning line 1\nWarning line 2', 'My Warning')
R = 1
Content displayed in the dialog with the caption 'My Warning' is
'Warning line 1'
'Warning line 1'
R = warndlg({'This', ' is', ' a', ' warning!!!'})
R = 1
Content displayed in the dialog is 'This is a warning!!!'