Skip to content

Terminal

Functions

Read Char

Get a single character input by the user.

Return Type: Char

Signatures:

char read_char()

Read Line

Read a line of text from the terminal. The user will see the text as they type it.

Return Type: String

Signatures:

string read_line()

Terminal Has Input

Checks if there is data waiting to be read by read line or read char.

Return Type: Boolean

Signatures:

bool terminal_has_input()

Write

Write

Write the passed in data to the terminal.

Parameters:

NameTypeDescription
dataCharThe character to write

Signatures:

void write(char data)

Write

Write the passed in data to the terminal.

Parameters:

NameTypeDescription
dataDoubleThe text to write

Signatures:

void write(double data)

Write

Write the passed in data to the terminal.

Parameters:

NameTypeDescription
dataIntegerThe text to write

Signatures:

void write(int data)

Write

Write the supplied text to the Terminal.

Parameters:

NameTypeDescription
textStringThe text to write

Signatures:

void write(string text)

Write Line

Write Line

Write the passed in data, then move to the next line/row of the terminal.

Parameters:

NameTypeDescription
dataCharThe character to write

Signatures:

void write_line(char data)

Write Line

Move to the next line/row of the terminal.

Signatures:

void write_line()

Write Line

Write the passed in data, then move to the next line/row of the terminal.

Parameters:

NameTypeDescription
dataDoubleThe text to write

Signatures:

void write_line(double data)

Write Line

Write the passed in data, then move to the next line/row of the terminal.

Parameters:

NameTypeDescription
dataIntegerThe text to write

Signatures:

void write_line(int data)

Write Line

Write the passed in text, then move to the next line/row of the terminal.

Parameters:

NameTypeDescription
lineStringThe text to write

Signatures:

void write_line(string line)