focus expression text field at startup -> version 1.2
[LeanCalc.git] / help / strprintf
1 NAME
2     strprintf - formatted print to a string
3
4 SYNOPSIS
5     strprintf(fmt, x_1, x_2, ...)
6
7 TYPES
8     fmt                 string
9     x_1, x_2, ...       any
10
11     return              string
12
13 DESCRIPTION
14     This function returns the string formed from the characters that
15     would be printed to standard output by printf(fmt, x_1, x_2, ...).
16
17 EXAMPLE
18     > strprintf("h=%d, i=%d", 2, 3);
19             "h=2, i=3"
20
21     > c = config("epsilon", 1e-6); c = config("display", 6);
22     > c = config("tilde", 1); c = config("outround", 0);
23     > c = config("fullzero", 0);
24     > fmt = "%f,%10f,%-10f,%10.4f,%.4f,%.f.\n";
25     > a = sqrt(3);
26     > strprintf(fmt,a,a,a,a,a,a);
27             "1.732051,  1.732051,1.732051  ,   ~1.7320,~1.7320,~1.
28     "
29
30 LIMITS
31     The number of arguments of strprintf() is not to exceed 100.
32
33 LINK LIBRARY
34     none
35
36 SEE ALSO
37     printf, fprintf, print
38