[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CALL* 
 Execute a C or Assembler procedure
------------------------------------------------------------------------------
 Syntax

     CALL <idProcedure> [WITH <exp list>]

 Arguments

     <idProcedure> is the name of the external procedure to CALL.

     WITH <exp list> is an optional list of up to seven expressions of
     any data type to pass to the external procedure.

 Description

     CALL executes a separately compiled or assembled procedure.  The
     procedure must be defined as FAR and end with a FAR return instruction.
     Place parameters on the stack using the C parameter passing convention.
     Each parameter consists of a FAR (four-byte) pointer to the actual
     parameter value.  When necessary you may use the WORD() function to pass
     a two-byte binary value in the WITH expression.  The DX:BX and ES:BX
     registers also contain a copy of the first four bytes of parameter
     information.

     The procedure must preserve the BP, SS, SI, DI, ES, and DS registers as
     well as clear the direction flag.

     CALL is a compatibility command and therefore not recommended.  It is
     superseded by the Extend system which provides functions for passing
     data to and from CA-Clipper.

 Notes

     .  Character strings:  Pass a character argument as a FAR pointer
        to a null-terminated string (a string with a 00 hex byte at the end).

     .  Numeric values:  Pass each numeric argument as a FAR pointer
        to an eight-byte IEEE floating point value.  To pass a parameter as
        an integer, use the WORD() function.  The WORD() function converts
        the numeric value to a two-byte binary integer, and passes the
        integer value directly rather than through a pointer.  Note that
        WORD() will not work for values outside of the #32,767 range since
        these values cannot be accurately represented as two-byte integers.

     .  Date values:  Pass each date argument as a FAR pointer to a
        four-byte (long) integer containing a Julian day number.

     .  Logical values:  Pass each logical argument as a FAR pointer
        to a two-byte binary integer containing zero for false (.F.) and one
        for  true (.T.) .

     .  Compiling and linking:  CALLed programs must conform to the
        following rules:

        -  Procedures must be in INTEL 8086 relocatable object file
           format with the .OBJ file extension.

        -  Procedures must follow the C calling and parameter passing
           conventions.

        -  Procedures must be available to the linker at link time, along
           with the library of the source compiler.  You will need runtime
           support for any language other than assembly language.  See your
           compiler manual for further information.

     .  Screen position:  When using a CALL statement to access a C or
        Assembler routine, the cursor is set to the current screen position
        within the C or Assembler routine.

     .  Microsoft C: Microsoft C versions 5.0 and above place a
        leading underscore on function names when they are compiled.  To call
        them, therefore, you must CALL _<function>.

     .  dBASE III PLUS: To convert a dBASE III PLUS load module to a
        CA-Clipper-compatible module, add the following statements to your
        .asm file:

        PUBLIC <proc>

        and

        push ds
        mov ds, dx

     Warning!  Modifying the parameter values may produce incorrect or
     unexpected results and, therefore, is strongly discouraged.

 Files   Library is CLIPPER.LIB.


See Also: WORD()*
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson