2 fprintf - formatted print to a file
5 fprintf(fd, fmt, x_1, x_2, ...)
15 This prints to the file fd exactly what would be printed to
16 the standard output by printf(fmt, x_1, x_2, ...).
19 > fprintf(files(1), "h=%d, i=%d\n", 2, 3);
22 > c = config("epsilon", 1e-6); c = config("display", 6);
23 > c = config("tilde", 1); c = config("outround", 0);
24 > c = config("fullzero", 0);
25 > fmt = "%f,%10f,%-10f,%10.4f,%.4f,%.f.\n";
27 > fprintf(files(2), fmt,a,a,a,a,a,a);
28 1.732051, 1.732051,1.732051 , ~1.7320,~1.7320,~1.
30 > file = fopen("/tmp/foo", "w");
31 > mat A[4] = {sqrt(2), 3/7, "undefined", null()};
32 > fprintf(file, "%f%r",A,A);
36 mat [4] (4 elements, 4 nonzero):
37 [0] = 1.4142135623730950488
38 [1] = ~.42857142857142857142
42 mat [4] (4 elements, 4 nonzero):
43 [0] = 1767766952966368811/1250000000000000000
49 The number of arguments of fprintf() is not to exceed 100.
55 printf, strprintf, print