Package com.scriptbasic
Class Engine.Sub<R>
java.lang.Object
com.scriptbasic.Engine.Sub<R>
- All Implemented Interfaces:
Subroutine<R>
- Enclosing class:
- Engine
public class Engine.Sub<R> extends java.lang.Object implements Subroutine<R>
-
Method Details
-
numberOfArguments
public int numberOfArguments()- Specified by:
numberOfArgumentsin interfaceSubroutine<R>- Returns:
- the number of arguments the subroutine expects when invoked
-
name
public java.lang.String name()Description copied from interface:SubroutineGet the name of the subroutine. Even though the instance of the interface is usually acquired knowing the name of the subroutine this method can be used to access this information.- Specified by:
namein interfaceSubroutine<R>- Returns:
- the name of the subroutine
-
call
Description copied from interface:SubroutineCall the subroutine.- Specified by:
callin interfaceSubroutine<R>- Parameters:
args- the arguments passed to the subroutine- Returns:
- the return value of the subroutine
- Throws:
ScriptBasicException- when an BASIC error happens during the execution of the subroutine
-
call
Description copied from interface:SubroutineCall a subroutine without any argument.- Specified by:
callin interfaceSubroutine<R>- Returns:
- the return value of the subroutine
- Throws:
ScriptBasicException- in case of exception
-