Blueprint Help Send comments on this topic.
ClpDiag

Glossary Item Box

Description

CLIP provides a diagnostics service that allows user code to generate and manage diagnostics and also display CLIP runtime generated diagnostics.

Generation

The ClpDiag function has identical functionality to the standard 'C' printf function except that the resulting string output is handled by a user defined function (see below). 

Uns ClpDiag( char *fmt [,arg]... );

fmt

Format control string (see  printf function ).

arg

Optional arguments.

Return

This function will return TRUE if successful, or FALSE if an error occurs.

Examples

Uns AppCct_PhilosopherMthdElem::ProcessThink()
{
   Uns success = FALSE;
   Uns elemNum = this->ElemNum();

   ClpDiag( "Philosopher %d: Thinking\n", elemNum );

   success = Think();

   ClpDiag( "Philosopher %d: Done Thinking %s\n", elemNum, (success ? "EUREKA" : "if at first ..." );

   return success;
}