com.ibm.apl2
Class Apl2interp

java.lang.Object
  |
  +--com.ibm.apl2.Apl2interp

public class Apl2interp
extends java.lang.Object

Start and use APL2 interpreters.

The final fields provide constants containing the APL characters and system names.


Field Summary
protected  int Apl2Env
          Address of APL2 interpreter's environment block
static char Assignment
           
static char Branch
           
static char Ceiling
           
static char Circle
           
static char Comment
           
static char Decode
           
static char Del
           
static char Delta
           
static char DeltaBar
           
static char DelTilde
           
static char Diamond
           
static char Divide
           
static char Drop
           
static char Each
           
static char Enclose
           
static char Encode
           
static char Enlist
           
static char Execute
           
static char Find
           
static char Floor
           
static char Format
           
static char GradeDown
           
static char GradeUp
           
static char GreaterEqual
           
static char IBeam
           
static char Index
           
static char Interval
           
static char Jot
           
static char LessEqual
           
static char Match
           
static char MatrixInverse
           
static char Multiply
           
static char Nand
           
static char NaturalLog
           
static char Nor
           
static char Not
           
static char NotEqual
           
static char Or
           
static char Pick
           
static java.lang.String QAF
           
static java.lang.String QAI
           
static java.lang.String QAT
           
static java.lang.String QAV
           
static java.lang.String QCR
           
static java.lang.String QCT
           
static java.lang.String QDL
           
static java.lang.String QEA
           
static java.lang.String QEC
           
static java.lang.String QEM
           
static java.lang.String QES
           
static java.lang.String QET
           
static java.lang.String QEX
           
static java.lang.String QFC
           
static java.lang.String QFX
           
static java.lang.String QIB
           
static java.lang.String QIO
           
static java.lang.String QLC
           
static java.lang.String QLX
           
static java.lang.String QNA
           
static java.lang.String QNC
           
static java.lang.String QNL
           
static java.lang.String QNLT
           
static java.lang.String QPK
           
static java.lang.String QPP
           
static java.lang.String QPR
           
static java.lang.String QPW
           
static java.lang.String QRL
           
static java.lang.String QSVC
           
static java.lang.String QSVE
           
static java.lang.String QSVO
           
static java.lang.String QSVQ
           
static java.lang.String QSVR
           
static java.lang.String QSVS
           
static java.lang.String QTC
           
static java.lang.String QTF
           
static java.lang.String QTS
           
static java.lang.String QTZ
           
static char Quad
           
static java.lang.String QUCS
           
static java.lang.String QUL
           
static char QuoteQuad
           
static java.lang.String QWA
           
static char Reverse
           
static char Rotate
           
static char Shape
           
static char SlashBar
           
static char SlopeBar
           
static char Take
           
static char Transpose
           
 
Constructor Summary
Apl2interp()
          Start an APL2 interpreter using default invocation options.
Apl2interp(java.lang.String[] Options)
          Start an APL2 interpreter.
 
Method Summary
 void Assign(Apl2object Name, Apl2object Value)
          Assign a name to a workspace object using Apl2objects for both name and value.
 void Assign(java.lang.String Name, Apl2object Value)
          Assign a name to a workspace object using a String name and an Apl2object value.
 void Associate(int Class, int Processor, Apl2object Name)
          Associate a name in the workspace using an int class, an int processor, and an Apl2object name.
 void Associate(int Class, int Processor, java.lang.String Name)
          Associate a name in the workspace using an int class, an int processor, and a String name.
 void Associate(java.lang.String Locator, int Processor, Apl2object Name)
          Associate a name in the workspace using a String locator, an int processor, and an Apl2object name.
 void Associate(java.lang.String Locator, int Processor, java.lang.String Name)
          Associate a name in the workspace using a String locator, an int processor, and a String name.
 Apl2object Execute(Apl2object Expression)
          Execute an expression using an Apl2object.
 Apl2object Execute(Apl2object Function, Apl2object Right)
          Execute a monadic function using Apl2objects for the function and argument.
 Apl2object Execute(Apl2object Left, Apl2object Function, Apl2object Right)
          Execute a dyadic function using Apl2objects for the function and arguments.
 Apl2object Execute(Apl2object Left, java.lang.String Function, Apl2object Right)
          Execute a dyadic function using a String for the function and Apl2objects for the arguments.
 Apl2object Execute(java.lang.String Expression)
          Execute an expression using a String.
 Apl2object Execute(java.lang.String Function, Apl2object Right)
          Execute a monadic function using a String for the function and an Apl2object for the argument.
 void Expunge(java.lang.String Name)
          Expunge a name.
 boolean IsInterruptPending()
          Check if an interrupt is pending
 void Stop()
          Shut down an interpreter.
protected static void ValidateApl2interp(Apl2interp Apl2interp)
          Validate the interpreter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Assignment

public static final char Assignment
See Also:
Constant Field Values

Branch

public static final char Branch
See Also:
Constant Field Values

Ceiling

public static final char Ceiling
See Also:
Constant Field Values

Circle

public static final char Circle
See Also:
Constant Field Values

Comment

public static final char Comment
See Also:
Constant Field Values

Decode

public static final char Decode
See Also:
Constant Field Values

Del

public static final char Del
See Also:
Constant Field Values

DelTilde

public static final char DelTilde
See Also:
Constant Field Values

Delta

public static final char Delta
See Also:
Constant Field Values

DeltaBar

public static final char DeltaBar
See Also:
Constant Field Values

Diamond

public static final char Diamond
See Also:
Constant Field Values

Divide

public static final char Divide
See Also:
Constant Field Values

Drop

public static final char Drop
See Also:
Constant Field Values

Each

public static final char Each
See Also:
Constant Field Values

Enclose

public static final char Enclose
See Also:
Constant Field Values

Encode

public static final char Encode
See Also:
Constant Field Values

Enlist

public static final char Enlist
See Also:
Constant Field Values

Execute

public static final char Execute
See Also:
Constant Field Values

Find

public static final char Find
See Also:
Constant Field Values

Floor

public static final char Floor
See Also:
Constant Field Values

Format

public static final char Format
See Also:
Constant Field Values

GradeDown

public static final char GradeDown
See Also:
Constant Field Values

GradeUp

public static final char GradeUp
See Also:
Constant Field Values

GreaterEqual

public static final char GreaterEqual
See Also:
Constant Field Values

IBeam

public static final char IBeam
See Also:
Constant Field Values

Index

public static final char Index
See Also:
Constant Field Values

Interval

public static final char Interval
See Also:
Constant Field Values

Jot

public static final char Jot
See Also:
Constant Field Values

LessEqual

public static final char LessEqual
See Also:
Constant Field Values

Match

public static final char Match
See Also:
Constant Field Values

MatrixInverse

public static final char MatrixInverse
See Also:
Constant Field Values

Multiply

public static final char Multiply
See Also:
Constant Field Values

Nand

public static final char Nand
See Also:
Constant Field Values

NaturalLog

public static final char NaturalLog
See Also:
Constant Field Values

Nor

public static final char Nor
See Also:
Constant Field Values

Not

public static final char Not
See Also:
Constant Field Values

NotEqual

public static final char NotEqual
See Also:
Constant Field Values

Or

public static final char Or
See Also:
Constant Field Values

Pick

public static final char Pick
See Also:
Constant Field Values

Quad

public static final char Quad
See Also:
Constant Field Values

QuoteQuad

public static final char QuoteQuad
See Also:
Constant Field Values

Reverse

public static final char Reverse
See Also:
Constant Field Values

Rotate

public static final char Rotate
See Also:
Constant Field Values

Shape

public static final char Shape
See Also:
Constant Field Values

SlashBar

public static final char SlashBar
See Also:
Constant Field Values

SlopeBar

public static final char SlopeBar
See Also:
Constant Field Values

Take

public static final char Take
See Also:
Constant Field Values

Transpose

public static final char Transpose
See Also:
Constant Field Values

QAI

public static final java.lang.String QAI
See Also:
Constant Field Values

QAV

public static final java.lang.String QAV
See Also:
Constant Field Values

QCT

public static final java.lang.String QCT
See Also:
Constant Field Values

QEM

public static final java.lang.String QEM
See Also:
Constant Field Values

QET

public static final java.lang.String QET
See Also:
Constant Field Values

QFC

public static final java.lang.String QFC
See Also:
Constant Field Values

QIO

public static final java.lang.String QIO
See Also:
Constant Field Values

QLC

public static final java.lang.String QLC
See Also:
Constant Field Values

QLX

public static final java.lang.String QLX
See Also:
Constant Field Values

QNLT

public static final java.lang.String QNLT
See Also:
Constant Field Values

QPP

public static final java.lang.String QPP
See Also:
Constant Field Values

QPR

public static final java.lang.String QPR
See Also:
Constant Field Values

QPW

public static final java.lang.String QPW
See Also:
Constant Field Values

QRL

public static final java.lang.String QRL
See Also:
Constant Field Values

QSVE

public static final java.lang.String QSVE
See Also:
Constant Field Values

QTC

public static final java.lang.String QTC
See Also:
Constant Field Values

QTS

public static final java.lang.String QTS
See Also:
Constant Field Values

QTZ

public static final java.lang.String QTZ
See Also:
Constant Field Values

QUL

public static final java.lang.String QUL
See Also:
Constant Field Values

QWA

public static final java.lang.String QWA
See Also:
Constant Field Values

QAF

public static final java.lang.String QAF
See Also:
Constant Field Values

QAT

public static final java.lang.String QAT
See Also:
Constant Field Values

QCR

public static final java.lang.String QCR
See Also:
Constant Field Values

QDL

public static final java.lang.String QDL
See Also:
Constant Field Values

QEA

public static final java.lang.String QEA
See Also:
Constant Field Values

QEC

public static final java.lang.String QEC
See Also:
Constant Field Values

QES

public static final java.lang.String QES
See Also:
Constant Field Values

QEX

public static final java.lang.String QEX
See Also:
Constant Field Values

QFX

public static final java.lang.String QFX
See Also:
Constant Field Values

QIB

public static final java.lang.String QIB
See Also:
Constant Field Values

QNA

public static final java.lang.String QNA
See Also:
Constant Field Values

QNC

public static final java.lang.String QNC
See Also:
Constant Field Values

QNL

public static final java.lang.String QNL
See Also:
Constant Field Values

QPK

public static final java.lang.String QPK
See Also:
Constant Field Values

QTF

public static final java.lang.String QTF
See Also:
Constant Field Values

QSVC

public static final java.lang.String QSVC
See Also:
Constant Field Values

QSVO

public static final java.lang.String QSVO
See Also:
Constant Field Values

QSVQ

public static final java.lang.String QSVQ
See Also:
Constant Field Values

QSVR

public static final java.lang.String QSVR
See Also:
Constant Field Values

QSVS

public static final java.lang.String QSVS
See Also:
Constant Field Values

QUCS

public static final java.lang.String QUCS
See Also:
Constant Field Values

Apl2Env

protected int Apl2Env
Address of APL2 interpreter's environment block

Constructor Detail

Apl2interp

public Apl2interp(java.lang.String[] Options)
           throws Apl2exception
Start an APL2 interpreter.

Parameters:
Options - Array of invocation option Strings. For example, {"-ws","20m"}.

Apl2interp

public Apl2interp()
           throws Apl2exception
Start an APL2 interpreter using default invocation options.

Method Detail

Stop

public void Stop()
          throws Apl2exception
Shut down an interpreter.

Note: Does not shut down the interpreter which started Java.

Apl2exception

IsInterruptPending

public boolean IsInterruptPending()
                           throws Apl2exception
Check if an interrupt is pending

Apl2exception

Assign

public void Assign(Apl2object Name,
                   Apl2object Value)
            throws Apl2exception
Assign a name to a workspace object using Apl2objects for both name and value.

Parameters:
Name - Apl2object containing name
Value - Apl2object containing value
Apl2exception

Assign

public void Assign(java.lang.String Name,
                   Apl2object Value)
            throws Apl2exception
Assign a name to a workspace object using a String name and an Apl2object value.

Parameters:
Name - String containing name
Value - Apl2object containing value
Apl2exception

Associate

public void Associate(int Class,
                      int Processor,
                      Apl2object Name)
               throws Apl2exception
Associate a name in the workspace using an int class, an int processor, and an Apl2object name.

Parameters:
Class - int containing the name class.
Processor - int containing the associated processor number.
Name - Apl2object containing the name to associate.
Apl2exception

Associate

public void Associate(int Class,
                      int Processor,
                      java.lang.String Name)
               throws Apl2exception
Associate a name in the workspace using an int class, an int processor, and a String name.

Parameters:
Class - int containing the name class.
Processor - int containing the associated processor number.
Name - String containing the name to associate.
Apl2exception

Associate

public void Associate(java.lang.String Locator,
                      int Processor,
                      Apl2object Name)
               throws Apl2exception
Associate a name in the workspace using a String locator, an int processor, and an Apl2object name.

Parameters:
Locator - String containing the locator information.
Processor - int containing the associated processor number.
Name - Apl2object containing the name to associate.
Apl2exception

Associate

public void Associate(java.lang.String Locator,
                      int Processor,
                      java.lang.String Name)
               throws Apl2exception
Associate a name in the workspace using a String locator, an int processor, and a String name.

Parameters:
Locator - String containing the locator information.
Processor - int containing the associated processor number.
Name - String containing the name to associate.
Apl2exception

Expunge

public void Expunge(java.lang.String Name)
             throws Apl2exception
Expunge a name.

Parameters:
Name - String containing the name to expunge.
Apl2exception

Execute

public Apl2object Execute(Apl2object Expression)
                   throws Apl2exception
Execute an expression using an Apl2object.

Parameters:
Expression - Apl2object containing the expression.
Apl2exception

Execute

public Apl2object Execute(java.lang.String Expression)
                   throws Apl2exception
Execute an expression using a String.

Parameters:
Expression - String containing the expression.
Apl2exception

Execute

public Apl2object Execute(Apl2object Function,
                          Apl2object Right)
                   throws Apl2exception
Execute a monadic function using Apl2objects for the function and argument.

Parameters:
Function - Apl2object containing the function name.
Right - Apl2object containing the right argument.
Apl2exception

Execute

public Apl2object Execute(java.lang.String Function,
                          Apl2object Right)
                   throws Apl2exception
Execute a monadic function using a String for the function and an Apl2object for the argument.

Parameters:
Function - String containing the function name.
Right - Apl2object containing the right argument.
Apl2exception

Execute

public Apl2object Execute(Apl2object Left,
                          Apl2object Function,
                          Apl2object Right)
                   throws Apl2exception
Execute a dyadic function using Apl2objects for the function and arguments.

Parameters:
Left - Apl2object containing the left argument.
Function - Apl2object containing the function name.
Right - Apl2object containing the right argument.
Apl2exception

Execute

public Apl2object Execute(Apl2object Left,
                          java.lang.String Function,
                          Apl2object Right)
                   throws Apl2exception
Execute a dyadic function using a String for the function and Apl2objects for the arguments.

Parameters:
Left - Apl2object containing the left argument.
Function - String containing the function name.
Right - Apl2object containing the right argument.
Apl2exception

ValidateApl2interp

protected static void ValidateApl2interp(Apl2interp Apl2interp)
                                  throws Apl2exception
Validate the interpreter

Apl2exception