Jump to content

SomSetOutChar: Difference between revisions

From EDM2
Created page with "This function changes the behavior of the somPrintf function. ==Syntax== <PRE> somTD_SOMOutCharRoutine *outCharRtn; somSetOutChar(outCharRtn); </PRE> ==Parameters==..."
 
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:somSetOutChar}}
This function changes the behavior of the [[somPrintf]] function.  
This function changes the behavior of the [[somPrintf]] function.  



Revision as of 03:32, 13 October 2017

This function changes the behavior of the somPrintf function.

Syntax

somTD_SOMOutCharRoutine     *outCharRtn;
somSetOutChar(outCharRtn);

Parameters

outCharRtn (somTD_SOMOutCharRoutine *)
A pointer to your routine that outputs a character in the way you want.

Return Code

Remarks

This function is called to change the output character routine that somPrintf invokes. By default, somPrintf invokes a character output routine that goes to "stdout." The execution of this function affects only the application (or thread) in which it occurs. Thus, this function is normally preferred over SOMOutCharRoutine for changing the output routine called by somPrintf, since SOMOutCharRoutine remains in effect for subsequent threads as well.

Some samples of this function can be found in the "somapi.h" header file.

Example Code


Related

Functions