
% terminal control routines

% get the number of rows and columns for a terminal window
%     tty_size(R,C)

% jump to row R, column C
%     tty_goto(C,R)

% unicode characters can be printed by their 8-(hex)digit id, e.g.
smile :- Smiley = "\U0001F600", write(Smiley).

% screen effects using ascii control sequences

% clear the screen (27 is the escape character)
clearscrn :- put(27), write("[2J"), put(27), write("[H").

% text effects using the ascii_term library

%   ansi_format([ListOfFormats], String, Arguments)
%      writes the string/arguments like format,
%      but uses the text settings from the list of formats
%   available formats:
%      bold, underline, fg(Colour), bg(Colour)
%   available colours:
%      red, green, blue, black, white, yellow, cyan, magenta
redworld :- ansi_format([bold,bg(red)], "Hello there!").


