1500 |
use the preprocessor instead for such things. And like stated above, |
use the preprocessor instead for such things. And like stated above, |
1501 |
there are certain things which you can only achieve with the preprocessor. |
there are certain things which you can only achieve with the preprocessor. |
1502 |
</p> |
</p> |
1503 |
|
|
1504 |
|
<h3>Disable Messages</h3> |
1505 |
<p> |
<p> |
1506 |
Since it is quite common to switch a script between a development version |
Since it is quite common to switch a script between a development version |
1507 |
and a production version, you actually don't need to wrap all your |
and a production version, you actually don't need to wrap all your |
1508 |
<code>message()</code> calls into preprocessor statements like in the |
<code>message()</code> calls into preprocessor statements like in the |
1509 |
previous example. There is actually a built-in preprocessor dedicated to |
previous example just to disable messages. There is actually a built-in |
1510 |
perform that task much more conveniently for you. So the previous example |
preprocessor condition dedicated to perform that task much more conveniently for you. |
1511 |
can be simplified like this: |
To disable all messages in your script, simply add <code>SET_CONDITION(NKSP_NO_MESSAGE)</code> |
1512 |
|
i.e. at the very beginng of your script. |
1513 |
|
So the previous example can be simplified like this: |
1514 |
</p> |
</p> |
1515 |
<code> |
<code> |
1516 |
{ Enable debug mode, so show all debug messages. } |
{ Enable debug mode, so show all debug messages. } |