System Commands

System Commands

System commands for controlling debug output, instantiation of the GUI, and exiting from the program.

debug

Syntax:

void debug(type); 
string  type;

Toggles debug output from various parts of the code. A full list of valid types is given in output types.

For example:

debug("parse");

getenv

Syntax:

string getenv(variable); 
string  variable;

Retrieves the contents of the named environment variable so that transfer of useful quantities can be made to Aten through a shell.

For example:

string s = getenv("HOSTNAME");

gets the name of the host Aten is running on (although what you would then usefully do with it I don't know).

Better examples can be found in the resources section of the website.

getenvf

Syntax:

double getenvf(variable); 
string  variable;

Retrieves the contents of the named environment variable, converting it to a floating-point (double) value in the process.

For example:

double d = getenvf("num");

gets the shell variable 'num' as a real number.

getenvi

Syntax:

int getenvi(variable); 
string  variable;

Retrieves the contents of the named environment variable, converting it to an integer value in the process.

For example:

int i = getenvi("count");

gets the shell variable 'count' as an integer number.

gui

Syntax:

void gui(); 

Starts the GUI (e.g. from a script), if it isn't already running.

For example:

gui();

help

Syntax:

help command

Provide short help on the supplied command.

For example:

help cellaxes;

searchcommands

Syntax:

void searchcommands(search); 
string  search;

Search all available commands for the (partial) command name specified.

seed

Syntax:

void seed(i); 
int  i;

Sets the random seed.

For example:

seed(3242638);

quit

Syntax:

void quit(); 

Quits out of the program.

For example:

quit();