Bull DPX/20 Guida Utente Pagina 76

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 424
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 75
1-64 SOMobjects Base Toolkit: Programmers Reference Manual
SOM_Test Macro
Purpose
Tests whether a boolean condition is true; if not, a fatal error is raised.
Syntax
void SOM_Test (boolean expression);
Description
The SOM_Test macro tests the specified boolean expression:
If the expression is TRUE and SOM_AssertLevel is set to a value greater than zero,
then an information message is output.
If the expression is FALSE, an error message is output and the process is terminated.
Note: The SOM_TestC macro is similar, except that it only outputs a warning message
in this situation.
Parameters
expression The boolean expression to test.
External (Global) Data
long SOM_AssertLevel; /* default is 0 */
Expansion
The SOM_Test macro tests the specified boolean expression. If the expression is TRUE
and SOM_AssertLevel is set to a value greater than zero, then an information message is
output. If the expression is FALSE, an error message is output and the process is
terminated.
C Example
#include <som.h>
main()
{
SOM_AssertLevel = 1;
SOM_Test(1=1);
}
Related Information
Macros: SOM_Assert, SOM_Except, SOM_TestC
Vedere la pagina 75
1 2 ... 71 72 73 74 75 76 77 78 79 80 81 ... 423 424

Commenti su questo manuale

Nessun commento