[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _evalNew()
 Initialize an EVALINFO structure for use
------------------------------------------------------------------------------
 C Prototype

     #include "item.api"
     BOOL _evalNew(
                    EVALINFOP evalInfoP,
                    ITEM itmEval
                  )

 Arguments

     evalInfoP is the structure to initialize.

     itmEval is a character or block item that is to be evaluated.

 Returns

     TRUE if the operation was successful.

 Description

     The _evalNew() function resets an EVALINFO structure for evaluation of a
     code block or routine name.  If itmEval is a character item, it is
     assumed to be the symbol name of a routine to execute.  Otherwise,
     itmEval is assumed to be a valid code block.

 Examples

     /*
     * USERDO()
     * --------
     */

     CLIPPER userDO( void )
     {
        EVALINFO info;
        USHORT   uiParam;
        ITEM     retP;

        /* Get evaluation expression */

        if ( PCOUNT < 1 )
        {
           _ret();
           return;
        }
        else
        {
           _evalNew( &info, _itemParam( 1 ) );
        }

        /* Get parameters */

        for ( uiParam=2; uiParam <= PCOUNT; uiParam++ )
        {
           _evalPutParam( &info, _itemParam(uiParam) );
        }

        /* Launch evaluation information */

        retP = _evalLaunch( &info );

        /* Release ITEMs associated w/eval info */

        _evalRelease( &info );

        _itemReturn ( retP );
        _itemRelease( retP );

        return;
     }

 Files  Library is CLIPPER.LIB, header file is Item.api.


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