10.06.2016 Views

eldo_user

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

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

Eldo Control Language<br />

Library of Functions for Tasks<br />

sprint<br />

Task function category: Functions Operating on Strings<br />

Returns a formatted string; same behavior as the C sprintf function.<br />

Usage<br />

sprint(FORMAT [,ARG]*)<br />

Arguments<br />

• FORMAT<br />

FORMAT is a string that contains the text to be formatted. This string can contain format<br />

tags. A format tag must follow this specification:<br />

%[flags][width][.precision]specifier<br />

where:<br />

specifier is:<br />

c for a character<br />

d or i or u for an integer number<br />

e or E for a double precision floating point number in scientific notation<br />

f for a double-precision floating-point number; the default precision is 6 digits<br />

g or G to use the shorter of %f or %e or %E<br />

s for a string<br />

x or X for an hexadecimal integer number<br />

% to print the % character<br />

flags is:<br />

- to force left justification within the given width<br />

+ to force the sign to be always written<br />

“ ” to insert a space before a number for which no sign is written<br />

# to specify if 0x or 0X must be written before a not null hexadecimal number or to<br />

specify if “.” must be always written for a double-precision floating-point number<br />

0 to insert zeroes instead of spaces before a number<br />

width is the minimum number of characters to be displayed (spaces are added if<br />

necessary)<br />

precision is the minimum number of digits to be written for integers (zeroes are added if<br />

necessary).<br />

or is the minimum number of digits to be written after the “.” for e, E and f specifiers.<br />

or is the maximum number of significant digits for g or G specifiers.<br />

or is the maximum number of characters to be written for string.<br />

Eldo® User's Manual, 15.3 961

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

Saved successfully!

Ooh no, something went wrong!