|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
at.objects.natives.NATSystem
class System
Instances of this class represent the 'system' object, accessible from the lexical root during execution of 'iat'. This object contains various native methods to interface with the shell environment. The interface of the system object is as follows: def system := object: { def argv := the table of extra command-line arguments passed to iat def exit() { quits iat } def print(@objs) { print objects to standard output } def println(@objs) { print objects to standard output, followed by a newline } // def read() { read character from standard input } def readln() { read next line from input } // def reset() { reset VM into fresh startup state and re-evaluates init and argument file } }
Field Summary | |
---|---|
Table |
getArgv
def argv := command-line arguments passed to iat |
Constructor Summary | |
---|---|
NATSystem(at.IAT shell,
java.lang.String[] argv)
|
Method Summary | |
---|---|
Table |
argv()
def argv := command-line arguments passed to iat |
Nil |
exit()
def exit() { quits iat } |
Nil |
print(Object[] objs)
def print(@obj) { print obj to standard output } |
Nil |
println(Object[] objs)
def println(@obj) { self.print(@[@obj, '\n']) } |
Nil |
readNextLine:catch:(Closure success,
Closure failure)
readNextLine: { |line| ... } catch: { |ioException| ... } Reads the next line on the input stream, represented by an ATText or nil if EOF has been reached. |
Methods inherited from class edu.vub.at.objects.natives.NativeATObject |
---|
==, freeVariables, super |
Methods inherited from interface edu.vub.at.objects.AbstractGrammar |
---|
freeVariables |
Methods inherited from interface edu.vub.at.objects.Object |
---|
super |
Field Detail |
---|
public Table getArgv
Constructor Detail |
---|
public NATSystem(at.IAT shell, java.lang.String[] argv)
Method Detail |
---|
public Table argv()
public Nil exit()
public Nil print(Object[] objs)
obj
- the object to print
edu.vub.at.exceptions.InterpreterException
- if obj cannot be converted into a native text valuepublic Nil println(Object[] objs)
public Nil readNextLine:catch:(Closure success, Closure failure)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |