Next: , Previous: , Up: Terminal   [Contents][Index]


18.16.2 Terminal Styling

Styling of the output sent to the terminal is supported in the form of styling classes. Each class is characterized by a name, a string.

A class is activated by using the function term_begin_class, and deactivated by using the function term_end_class. Several classes can be activated simultaneously, but they should be deactivated in reverse order. It is down to the implementation to decide how to honor some given class, i.e. to decide how to characterize it physically (visually, or audibly, or using an electrical discharge on the keyboard, or whatever) The class may very well be ignored all together. Poke programs should never rely on how a specific class is implemented.

The term_begin_class and term_end_class functions have the following signatures:

fun term_begin_class = (string class) void
fun term_end_class = (string class) void

Styling classes can overlap, but trying to deactivate them in the wrong order will cause an error in the form of an E_inval exception.