FreeMat

- Main Page
- Related Pages

WARNING Emits a Warning Message

Section: Flow Control

# Usage

The `warning` function causes a warning message to be sent to the user. The general syntax for its use is

       warning(s)

where `s` is the string message containing the warning.

The `warning` function can also be used to turn off warnings, and to retrieve the current state of the warning flag. To turn off warnings use the syntax

       warning off

at which point, warnings will not be displayed. To turn on warnings use the syntax

       warning on

In both cases, you can also retrieve the current state of the warnings flag

       y = warning('on')
       y = warning('off')