Jump to content

SomLPrintf: Difference between revisions

From EDM2
Created page with "This function prints a formatted string in the manner of the C printf function, at the specified indentation level. ==Syntax== <PRE> long level; string fmt; long ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:somLPrintf}}
This function prints a formatted string in the manner of the C printf function, at the specified indentation level.
This function prints a formatted string in the manner of the C printf function, at the specified indentation level.


Line 12: Line 13:


==Parameters==
==Parameters==
;level (long) : The level at which output is to be placed.  
;level (long): The level at which output is to be placed.
 
;fmt (string): The format string to be output.
; fmt (string) : The format string to be output.  


==Return Code==
==Return Code==
; rc (long) : Returns the number of characters written.
;rc (long) : Returns the number of characters written.


==Remarks==
==Remarks==
Line 29: Line 29:


==Related==
==Related==
===Data Structures===
;Data Structures
* string (somcorba.h)  
* string (somcorba.h)  
===Functions===
;Functions
* somVprintf  
* [[somVprintf]]
* somPrefixLevel  
* [[somPrefixLevel]]
* somPrintf  
* [[somPrintf]]
* SOMOutCharRoutin
* [[SOMOutCharRoutine]]


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

Latest revision as of 02:29, 6 May 2020

This function prints a formatted string in the manner of the C printf function, at the specified indentation level.

Syntax

long     level;
string    fmt;
long      rc;

rc = somLPrintf(level, fmt,· · ·);

The values to be substituted into the format string.

Parameters

level (long)
The level at which output is to be placed.
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 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.) The output is prefixed at the indicated level, by preceding it with 2*level spaces.

Example Code

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

Related

Data Structures
  • string (somcorba.h)
Functions