|
| Previous: 3.9 UTIL -- Utilities | TOC | Index | Back | Next: 3.9.2 BUFLEN |
OBJECT U[UTIL];
The UTIL (utility) class contains utility procedures for miscellaneous tasks. Currently, there are methods for sending formatted output to various channels like the system output, file descriptors, or streams. Using the UTIL class simplifies many frequently used code fragments. For example, the code
DO VAR buffer::256;
t.write(T3X.SYSOUT, str.format(buffer, "X = %D\N", [(x)]),
str.length(buffer));
END
may be replaced with
u.printf("X = %D\N", [(x)]);
in modules depending on the UTIL class.
| Previous: 3.9 UTIL -- Utilities | TOC | Index | Back | Next: 3.9.2 BUFLEN |