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>_itemputl()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _itemPutL()
 Place a logical value into an Item
------------------------------------------------------------------------------
 C Prototype

     #include "item.api"
     ITEM _itemPutL(
                     ITEM itemLogic,
                     BOOL bValue
                   )

 Arguments

     itemLogic is the Item in which you want to place the logical value.
     If itemLogic is NULL, _itemPutL() will create a new Item.

     bValue is the logical (boolean) value to place into the Item.  As
     with C, zero represents FALSE, and nonzeros represent TRUE.

 Returns

     A new Item reference containing the logical value passed.

 Description

     The _itemPutL() function allows you to place a logical value into an
     Item.  Note that if the first parameter passed to _itemPutL() is NULL,
     _itemPutL() will create a new Item and place the logical value lValue in
     that Item.  The data contained in itemLogic is released to SVOS for
     garbage collection.

     Caution!  Do not assume that the address in itemLogic will be the
     same address returned by _itemPutL().

 Examples

     /*
     *
     * IsDouble( nNumber ) -> lIsIt
     *
     *
     * Returns true if the number passed is
     * internally represented as a double.
     */

     CLIPPER IsDouble( void )
     {
        ITEM itemRet, itemNum;

        itemRet = _itemPutL( NULL, FALSE );

        if (PCOUNT > 0)
        {
           itemNum = _itemParam( 1 );

           if (_itemType( itemNum ) & DOUBLE)
              itemRet = _itemPutL( itemRet, TRUE );

           _itemRelease( itemNum );
        }

        _itemRelease( _itemReturn( itemRet ) );

        return;
     }

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


See Also: _itemGetL()

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