t3x.org / t3x / t3x-manual / 391.html
 
T3X - A Minimum Procedural Language
Version 8.1.5, Online Edition
Copyright(C) 1996-2004
Nils M Holm
 
Previous:
3.9 UTIL -- Utilities
TOC | Index | Back Next:
3.9.2 BUFLEN

3.9.1 UTIL Class Usage

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