06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

fprintf pREPC+ <strong>System</strong> <strong>Calls</strong><br />

e or<br />

E<br />

g or<br />

G<br />

The argument is assumed to be a double and is converted to<br />

decimal notation in the form [-]d.ddde(E)+dd. The precision<br />

specifies the number of digits to appear after the decimalpoint.<br />

The default precision is six. If the precision is zero, no<br />

decimal-point is printed. The value is rounded to the<br />

appropriate number of digits.<br />

The argument is assumed to be a double and is converted to<br />

decimal notation in the form of either e or f. This depends<br />

on the value of the converted number. The f form is used<br />

unless the exponent is less than -4 or greater than or equal<br />

to the precision. The precision specifies the number of<br />

significant digits. The decimal-point character appears only<br />

if a digit follows it.<br />

c The argument is assumed to be an int and is converted to<br />

an unsigned char.<br />

s The argument is assumed to be a pointer to a string.<br />

Characters in the string are printed until a null character is<br />

detected or until the number of characters indicated by the<br />

precision is exhausted.<br />

p The argument is assumed to be a pointer to a void and the<br />

value of the pointer is printed as a hexadecimal number.<br />

n The argument is assumed to be pointer to an integer into<br />

which is written the number of characters written by this<br />

call so far.<br />

% A % character is written.<br />

Below is a table of modifiers that can precede a conversion specifier.<br />

If a modifier appears with any conversion specifier not listed, the<br />

behavior is undefined.<br />

Modifier Specifier Default Argument Type Modified Argument Type<br />

h d,i int short int<br />

h o,u,x,X unsigned int unsigned short<br />

h n pointer to int pointer to short int<br />

l d,i int long<br />

l o,u,x,X unsigned int unsigned long<br />

l n pointer to int pointer to long int<br />

L e,E,f,g,G double long double<br />

3-46 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!