Language Reference

MODULEIN Function

calls an external routine that returns a numeric value

MODULEIN( control, modname, <matrix1,...,matrix13>);

The inputs to the MODULEIN function are as follows:


control
is a character matrix containing a control string.

modname
is a character matrix containing the name of the external routine to be called.

matrix
matrices with parameters to be passed to the external routine.

The MODULEIN routine executes a routine modname that resides in an external shared library with the specified arguments, and returns a character value. The description of this function is identical that for to the MODULEI call, except that the MODULEIN function returns a scalar numeric value from the external routine.

See the MODULEI call for a full description of the function and its inputs.

This example invokes the changi routine from the TRYMOD.DLL module on a Windows platform. Use the following attribute table.

  
    routine changi module=trymod returns=long; 
    arg 1 input num format=ib4. byvalue; 
    arg 2 update num format=ib4.;
 

The following PROC IML code calls the changi function:

  
    proc iml; 
       x1=J(4,5,0); 
       do i=1 to 4; 
          do j=1 to 5; 
             x1[i,j]=i*10+j+3; 
          end; 
       end; 
       y1=x1; 
       x2=x1; 
       y2=y1; 
       rc=modulein('*i','changi',6,x2);
 

Previous Page | Next Page | Top of Page