09.03.2015 Views

Unicon Language Reference Clinton L. Jeffery Shamim Mohamed ...

Unicon Language Reference Clinton L. Jeffery Shamim Mohamed ...

Unicon Language Reference Clinton L. Jeffery Shamim Mohamed ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

member(x, ...) : x?<br />

test membership<br />

member(x, ...) returns x if its second and subsequent arguments are all members of set, cset, list<br />

or table x but fails otherwise. If x is a cset, all of the characters in subsequent string arguments<br />

must be present in x in order to succeed.<br />

membernames(x) : list<br />

class member names<br />

membernames(x) produces a list containing the string names of the fields of x, where x is either<br />

an object or a string name of a class.<br />

methodnames(x) : list<br />

class method names<br />

methodnames(x) produces a list containing the string names of the methods defined in class x,<br />

where x is either an object or a string name of a class.<br />

methods(x) : list<br />

class method list<br />

methods(x) produces a list containing the procedure values of the methods of x, where x is either<br />

an object or a string name of a class.<br />

min(n, ...) : number<br />

smallest value<br />

min(x, ...) returns the smallest value among its arguments, which must be numeric.<br />

mkdir(s, s?) : ?<br />

create directory<br />

mkdir(path, mode) creates a new directory named path with mode mode. The optional mode<br />

parameter can be numeric or a string of the form accepted by chmod(). The function succeeds if<br />

a new directory is created.<br />

move(i:1) : string<br />

move scanning position<br />

move(i) moves &pos i characters from the current position and returns the substring of &subject<br />

between the old and new positions. This function reverses its effects by resetting the position to<br />

its old value if it is resumed.<br />

mutex(x,y) : x<br />

create a mutex<br />

mutex() creates a new mutex. For mutex(x) associates the new mutex with structure x. The call<br />

mutex(x,y) associates an existing mutex y (or mutex associated with protected object y) with<br />

structure x.<br />

name(v, CE:&current) : string<br />

variable name<br />

name(v) returns the name of variable v within the program that created co-expression c. Keyword<br />

variables are recognized and named correctly. name() returns the base type and subscript or field<br />

information for variables that are elements within other values, but does not produce the source<br />

code variable name for such variables.<br />

numeric(any) : number<br />

convert to number<br />

numeric(x) produces an integer or real number resulting from the type conversion of x, but fails<br />

if the conversion is not possible.<br />

open(s, s:”rt”, ...) : file?<br />

open file<br />

25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!