Hello World in T3X

Using only the T3X Core Class

module hello(t3x);

object t[t3x];

do
    t.write(T3X.SYSOUT, "Hello, World!\n", 14);
end

Using PRINTF from the Utility Class

module hello(util);

object u[util];

do
    u.printf("Hello, %S!\n", ["World"]);
end

Using the String Class

This version also outputs the proper newline sequence of the target operating system.

module hello3(t3x, string);

object t[t3x], str[string];

writes(s) t.write(T3X.SYSOUT, s, str.length(s));

do var nl::3;
    writes("Hello, World!");
    writes(t.newline(nl));
end

contact  |  privacy