Here we summarize all of the Glish functions and variables according to their categories.

Functions for finding out about the type of a value:

is_boolean(x) is_byte(x) is_short(x) is_integer(x) is_float(x) is_double(x) is_complex(x) is_dcomplex(x) is_string(x) is_record(x) is_function(x) is_agent(x) is_numeric(x) is_fail(x)each return

is_const(x) is_modifiable(x)

type_name(x) full_type_name(x)return a

field_names(x)returns a

has_field(x,field)returns

as_boolean(x) as_byte(x) as_short(x) as_integer(x) as_float(x) as_double(x) as_complex(x) as_dcomplex(x) as_string(x)return the value

floor(x) ceiling(x)converts

length(...) len(...)return the lengths of its arguments.

sum(...) prod(...)returns the sum of all of the elements of all of the arguments.

min(...) max(...)return the minimum and maximum element among its arguments.

range(...)returns a 2-element vector giving the minimum of all of the arguments in the first element and the maximum of all of the arguments in the second.

sort(x)returns

sort_pair(x,y)returns

order(x)returns the indices of the sorted elements of

real(x) imag(x)return the real and imaginary portions respectively of

complex(x,y)creates a complex vector from two numeric vectors. Operates element by element, or scalar paired with elements.

conj(x)returns the complex conjugate of

arg(x)returns the

sqrt(x) exp(x) log(x) ln(x) sin(x) cos(x) tan(x) asin(x) acos(x) atan(x) abs(x)each return values corresponding to applying the given mathematical function element-by-element to

all(x)returns

any(x)returns

seq(x) seq(x,y) seq(x,y,z)return the integers from

ind(x)returns a vector of integer indices ranging from

rep(value,count)returns a vector consisting of

array(init, ...)creates an array initialized to

cbind(a, ...) rbind(a, ...)returns an array which is created by augmenting

time()returns the system time in seconds since 00:00, January 1, 1970.

random() random(n) random(start,stop)returns a random integer(s).

paste(...,sep=' ') spaste(...)treat their arguments as

split(s) split(s,sep)splits the string

symbol_names() symbol_names(f)returns the names of the variables defined in the system. If passed a function, it will use the function to limit the names returned.

symbol_value(s)takes a string,

symbol_set(name,value) symbol_set(rec)sets the value for the variable named

symbol_delete(name)deletes the symbol called

is_defined(name)returns

num_args(...)returns the number of arguments with which it was invoked.

nth_arg(n, ...)returns the

missing( )returns a

read_value(file)reads a Glish value saved to the file

write_value(value,file)writes the value

create_agent()returns a new

client(command, ..., host=F, input=F, suspend=F, ping=F, async=F)creates a new Glish client with the given options.

shell(command, ..., host=F, input=F, suspend=F, ping=F, async=F)either runs a shell command synchronously (

sync(c)waits until client

relay(src, src_name, ref dest, dest_name="*")relays any

relay_all(src, ref dest)relays every event from

birelay_event(ref agent1, ref agent2, name)relays every

birelay_all( ref agent1, ref agent2 )relays every event generated by either

current_whenever()returns an index identifying the

last_whenever_executed()returns an index identifying the most-recently executed

whenever_stmts(agent)returns a record identifying the event names and

active_agents()returns a record array listing the currently active agents.

pi eapproximations of the mathematical constants and

argvholds a

environis a

systemis an agent record giving information about the execution environment of the Glish system.

scriptis either an agent record if a Glish script is running as a client of another Glish script, or the