Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Technical Reference - <b>_itemgetl()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _itemGetL()
 Retrieve a logical value from an item
------------------------------------------------------------------------------
 C Prototype

     #include "item.api"
     BOOL _itemGetL(
                     ITEM itmLogic
                   )

 Arguments

     itmLogic is the item from which to retrieve a logical value.

 Returns

     The boolean value TRUE or FALSE.

 Description

     The _itemGetL() function is used to retrieve a logical value from the
     item passed, and return it as a boolean value.  If itmLogic is not a
     CA-Clipper-level logical type (LOGICAL), the results will be
     unpredictable.

 Examples

     /*
     *  YesNo( lExpr ) -> cValue
     *
     *  Given a logical expression, returns the
     *  string "Yes" if true, and "No " if false.
     *
     */

     CLIPPER YesNo( void )
     {
        ITEM itmParam, itmCRet;

        // Warning: DGROUP!

        itmCRet = _itemPutC( NULL, "No " );

        if (PCOUNT > 0)
        {
           itmParam = _itemParam( 1 );
           if (_itemGetL( itmParam ))
              itmCRet = _itemPutC( itmCRet, "Yes");

           _itemRelease( itmParam );
        }

        _itemRelease( _itemReturn( itmCRet ) );
        return;
     }

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


See Also: _itemPutL()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson