Bull DPX/20 Guia do Utilizador Página 77

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 424
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 76
SOM Kernel Reference 1-65
SOM_TestC Macro
Purpose
Tests whether a boolean condition is true; if not, a warning message is output.
Syntax
void SOM_TestC (boolean expression);
Description
The SOM_TestC 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 and SOM_WarnLevel is set to a value greater than zero, then
a warning message is output.
Note: The SOM_Test macro is similar, except that it raises a fatal error in this situation.
Parameters
expression The boolean expression to test.
External (Global) Data
long SOM_AssertLevel; /* default is 0 */
long SOM_WarnLevel; /* default is 0 */
Expansion
The SOM_TestC 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 and SOM_WarnLevel is set to a value greater than zero,
a warning message is output.
C Example
#include <som.h>
main()
{
SOM_WarnLevel = 1;
SOM_TestC(1=1);
}
Related Information
Macros: SOM_Assert, SOM_Except, SOM_Test
Vista de página 76
1 2 ... 72 73 74 75 76 77 78 79 80 81 82 ... 423 424

Comentários a estes Manuais

Sem comentários