Darwin Help

Back to Index

sprintf

Function sprintf - Storage print -return a string as if printed

Calling Sequence  sprintf(p,a1..ak)
Parameters
NameTypeDescription

p pattern (same format as for printf) 
ai arguments to be formatted according to p 
Return Type  string
Synopsis This function behaves similar to C's sprintf function.
Examples
> i:=5;
i := 5
> j:=6;
j := 6
> sprintf('i and j are: %d %d', i, j);
i and j are: 5 6


See also printf (for a complete list of all conversion codes),   sscanf