Jump to content

SomPrintf: Difference between revisions

From EDM2
Created page with "This function prints a formatted string in the manner of the C printf function. ==Syntax== <PRE> string fmt; long rc; rc = somPrintf(fmt,· · ·); </PRE> The values..."
 
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:somPrintf}}
This function prints a formatted string in the manner of the C printf function.
This function prints a formatted string in the manner of the C printf function.


Line 26: Line 27:
==Related==
==Related==
===Functions===
===Functions===
* somVprintf  
* [[somVprintf]]
* somPrefixLevel  
* [[somPrefixLevel]]
* somLPrintf  
* [[somLPrintf]]
* SOMOutCharRoutin
* [[SOMOutCharRoutine]]


[[Category:SOM Kernel]]
[[Category:SOM Kernel]]

Revision as of 20:17, 12 October 2017

This function prints a formatted string in the manner of the C printf function.

Syntax

string    fmt;
long      rc;

rc = somPrintf(fmt,· · ·);

The values to be substituted into the format string.

Parameters

fmt (string)
The format string to be output.

Return Code

rc (long)
Returns the number of characters written.

Remarks

This function prints a formatted string using function SOMOutCharRoutine, in the same manner as the C printf function. The implementation of SOMOutCharRoutine determines the destination of the output, while the C printf function is always directed to stdout. (The default output destination for SOMOutCharRoutine is stdout also, but this can be modified by the user.)

Example Code

#include <somcls.h>
somPrintf("The class name is %s.\n", _somGetClassName(obj));

Related

Functions