net.sf.tomp.xtcl.command
Class Ret

java.lang.Object
  extended by net.sf.tomp.xtcl.command.AbstractCommand
      extended by net.sf.tomp.xtcl.command.Ret
All Implemented Interfaces:
Command

public class Ret
extends AbstractCommand

Returns from a function, giving the results back to parent (calling) Context

Author:
tomp

Field Summary
protected  java.lang.String[] returns
          variables to be returned (copied) to parent Context
 
Constructor Summary
Ret()
           
 
Method Summary
 int execute(Context c)
          Returns from a function, giving the results back to parent (calling) Context under names $1 ..
 void setReturns(java.lang.String[] r)
          set variables to be returned (copied) to parent Context
 java.lang.String toString()
           
 
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand
done, initParameters, listArray, listList, listMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

returns

protected java.lang.String[] returns
variables to be returned (copied) to parent Context

Constructor Detail

Ret

public Ret()
Method Detail

setReturns

public void setReturns(java.lang.String[] r)
set variables to be returned (copied) to parent Context

Parameters:
r - variables to be returned (copied) to parent Context

execute

public int execute(Context c)
            throws java.lang.Exception
Returns from a function, giving the results back to parent (calling) Context under names $1 .. $n (for n-params)

Specified by:
execute in interface Command
Overrides:
execute in class AbstractCommand
Parameters:
c - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.Exception - DOCUMENT ME!

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
"RETURN (" + listArray(returns) + ")";


Copyright © 2004-2005 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.