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.2 . 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 itemLogic
                   )

 Arguments

     itemLogic 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 itemLogic 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 itemParam, itemCRet;

        // Warning: DGROUP!

        itemCRet = _itemPutC( NULL, "No " );

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

           _itemRelease( itemParam );
        }

        _itemRelease( _itemReturn( itemCRet ) );
        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