Welcome to PenUltima Online. Click to login or register.

File: basicio.em

Description: Basic I/O functions.
Last Modified: 10/17/2023

File Constants:

const CONSOLE_COLOR_RED     := "\x1b[31m";
const CONSOLE_COLOR_GREEN := "\x1b[32m";
const CONSOLE_COLOR_YELLOW := "\x1b[33m";
const CONSOLE_COLOR_BLUE := "\x1b[34m";
const CONSOLE_COLOR_MAGENTA := "\x1b[35m";
const CONSOLE_COLOR_CYAN := "\x1b[36m";



Print(anything, console_color:="")
Name Type
anything Any object, or primitive.
console_color xterm text formatting string e.g. one of the CONSOLE_COLOR constants
Prints 'anything' to the console. If it's a string or number, it will show the value. If it's an array, struct or dictionary, it will show the contents of the structure fairly nicely. On Packets it will show the content. Else, it shows the type of object, i.e. 'ItemRef'.
Parameter console_color needs linux or windows 11, when given ends the line with resetting the formatting ("\x1b[0m"). Via pol.cfg EnableColoredOutput color prints can be disabled.
Return values