[<<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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson