From 8898b7a7291bf4f1c53824f5b7fca331a1d3dd30 Mon Sep 17 00:00:00 2001 From: Andi Jahja Date: Tue, 6 Jul 1999 14:15:16 +0000 Subject: [PATCH] Extend.c Changes Per Bruno --- harbour/source/rtl/extend.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/harbour/source/rtl/extend.c b/harbour/source/rtl/extend.c index 49a68b3fbc..31e943eda6 100644 --- a/harbour/source/rtl/extend.c +++ b/harbour/source/rtl/extend.c @@ -163,10 +163,14 @@ int hb_parl( WORD wParam, ... ) if( pItem->type & IT_BYREF ) pItem = stack.pItems + pItem->item.asRefer.value; - if( IS_ARRAY( pItem ) && wArrayIndex ) - /* TODO: implement wArrayIndex use when retrieving an array element */ - return 0; - + if( IS_ARRAY( pItem ) ) + { + if( wArrayIndex ) + return hb_arrayGetBool( pItem, wArrayIndex ); + else + return 0; + } + else if( IS_LOGICAL( pItem ) ) return pItem->item.asLogical.value; @@ -192,10 +196,13 @@ double hb_parnd( WORD wParam, ... ) if( pItem->type & IT_BYREF ) pItem = stack.pItems + pItem->item.asRefer.value; - if( IS_ARRAY( pItem ) && wArrayIndex ) - /* TODO: implement wArrayIndex use when retrieving an array element */ - return 0; - + if( IS_ARRAY( pItem ) ) + { + if( wArrayIndex ) + return hb_arrayGetDouble( pItem, wArrayIndex ); + else + return 0; + } else if( IS_INTEGER( pItem ) ) return pItem->item.asInteger.value;