|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmurlen.util.fscript.FScript
murlen.util.fscript.BasicIO
BasicIO - an simple IO Subclass of FScript
Copyright (C) 2000 murlen.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
Constructor Summary | |
BasicIO()
Constructor |
Method Summary | |
java.lang.Object |
callFunction(java.lang.String name,
java.util.ArrayList param)
Overridden from FScript implements the following FScript functions |
Methods inherited from class murlen.util.fscript.FScript |
callScriptFunction, cont, evaluateExpression, getContext, getError, getScriptVar, getVar, getVar, load, loadLine, registerExtension, reset, run, setScriptVar, setVar, setVar, unRegisterExtension |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicIO()
Method Detail |
public java.lang.Object callFunction(java.lang.String name, java.util.ArrayList param) throws FSException
Overridden from FScript implements the following FScript functions
note that this only provides very basic IO facilities, line by line read/write to files, and stdio read write. There is a maximum of 25 open files
(void) println(param...) - write to stdout - takes variable parameter list
string readln() - reads a string from stdin
int open(string filename,string mode) - opens a file 'filename' for reading (mode="r") or writing (mode="w") returns an integer which is used in future calls. Returns -1 on >25 files opened
string read(fp) - reads one line from previously openened file
void write(fp,param...) - writes concatination of all params to one line of file
callFunction
in interface FSFunctionExtension
callFunction
in class FScript
name
- the function nameparam
- an ArrayList of parameter values
FSException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |