term.print( [ x, y ], str1, [ str2, ..., strn ] )

x (optional) - write the string at this column. If x is specified, y must also be specified

y (optional) - write the string at this line. If y is specified, x must also be specified

str1 - the first string to write

str2 (optional) - the second string to write

strn (optional) - the nth string to write

Returns: nothing.

cx = term.getcx()

Get the current column of the cursor

Arguments: none.

Returns: The column of the cursor

cy = term.getcy()

Get the current line of the cursor

Arguments: none.

Returns: The line of the cursor

ch = term.getchar( [ mode ] )

Read a char (a key press) from the terminal

Arguments: mode (optional) - terminal input mode. It can be either:

term.WAIT - wait for a key to be pressed, then return it. This is the default behaviour if mode is not specified.

term.NOWAIT - if a key was pressed on the terminal return it, otherwise return -1.

Returns: The char read from a terminal or -1 if no char is available. The 'char' can be an actual ASCII char, or a 'pseudo-char' which encodes special keys on the keyboard. The list of the special chars and their meaning is given in the table below: