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>_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 itmLogic,
                     BOOL bValue
                   )

 Arguments

     itmLogic is the item in which you want to place the logical value.
     If itmLogic 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 itmLogic is released to SVOS for
     garbage collection.

     Caution!  Do not assume that the address in itmLogic 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 itmRet, itmNum;

        itmRet = _itemPutL( NULL, FALSE );

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

           if (_itemType( itmNum ) & DOUBLE)
              itmRet = _itemPutL( itmRet, TRUE );

           _itemRelease( itmNum );
        }

        _itemRelease( _itemReturn( itmRet ) );

        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