APL-Journal - APL Germany e. V.
APL-Journal - APL Germany e. V.
APL-Journal - APL Germany e. V.
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>APL</strong>-<strong>Journal</strong><br />
An <strong>APL</strong>2 interpreter called from Java has the same restrictions<br />
as the <strong>APL</strong>2 Runtime Library.<br />
Sample Java Programm<br />
The COM function supports several commands:<br />
QUERY Query information about COM<br />
classes and objects<br />
CREATE Create instances of COM classes<br />
CONNECT Connect to running COM programs<br />
METHOD Invoke COM object methods<br />
PROPERTY Specify and reference COM object<br />
properties<br />
HANDLERS Specify and reference COM object<br />
event handlers<br />
WAIT Wait for COM events<br />
RELEASE Release references to COM objects<br />
CONFIG Set configuration options<br />
COM Events Example<br />
Java Resources<br />
The Java Tutorial:<br />
java.sun.com/docs/books/tutorial/index.html<br />
<strong>APL</strong>2‘s interfaces to Java:<br />
<strong>APL</strong>2 User’s Guide<br />
And a new <strong>APL</strong>2 book:<br />
<strong>APL</strong>2 Programming: Using <strong>APL</strong>2 with WebSphere<br />
<strong>APL</strong>2, COM, and Visual Basic<br />
<strong>APL</strong>2 has two new interfaces on Windows:<br />
The COM external function<br />
Enables <strong>APL</strong>2 applications to access Component<br />
Object Model (COM) objects including applications<br />
such as Microsoft Agent and Excel. Applications can<br />
efficiently pass arrays directly between <strong>APL</strong>2 and COM<br />
objects.<br />
The Visual Basic interface to Calls to <strong>APL</strong>2<br />
Enables <strong>APL</strong>2 to be easily called from products that<br />
support Visual Basic macros such as Microsoft Excel<br />
and Word.<br />
Simple COM Example<br />
EXCEL½COM 'CREATE' 'Excel.Application'<br />
WB½COM 'METHOD' EXCEL 'Workbooks.Open''D:\TEST.xls'<br />
DATA½COM 'PROPERTY' EXCEL 'ActiveSheet.UsedRange.Value'<br />
COM 'PROPERTY' EXCEL 'DisplayAlerts' 0<br />
COM 'METHOD' WB 'Close<br />
Close'<br />
COM 'RELEASE' WB<br />
COM 'RELEASE' EXCEL<br />
Calling <strong>APL</strong>2 from Visual Basic<br />
The Visual Basic interface to Calls to <strong>APL</strong>2 supports the<br />
following features:<br />
Using COM Objects from <strong>APL</strong>2<br />
The COM external function provides access to Microsoft<br />
Component Object Model (COM) objects.<br />
[result ½] [control] COM 'COMMAND' [arguments]<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
Starting and Stopping <strong>APL</strong>2 Interpreters<br />
Using Workspace Objects<br />
Assigning, Associating, and Expunging Names<br />
Executing Expressions and Functions<br />
Using <strong>APL</strong> Characters in Visual Basic Programs<br />
Handling <strong>APL</strong>2 Errors<br />
Data Conversion Between Visual Basic and <strong>APL</strong>2<br />
<strong>APL</strong> - <strong>Journal</strong> 2006, 25. Jg., Heft 1/2 31