2002-11-01 16:20 UTC-0300 Walter Negro <anegro@overnet.com.ar>

* include/hbexprb.c
    ! Fix assign to array_at.
      This resolve FOR n[1]:=1 TO 2
      Fix borrowed from xHarbour
This commit is contained in:
Walter Negro
2003-01-11 19:22:16 +00:00
parent 2c14e30ec3
commit 5efe1e05d3

View File

@@ -1021,14 +1021,29 @@ static HB_EXPR_FUNC( hb_compExprUseArrayAt )
case HB_EA_POP_PCODE:
{
#ifndef HB_C52_STRICT
BOOL bRemoveRef = FALSE;
/* to manage strings as bytes arrays, they must be pushed by reference */
/* arrays also are passed by reference */
if( pSelf->value.asList.pExprList->ExprType == HB_ET_VARIABLE )
{
pSelf->value.asList.pExprList->ExprType = HB_ET_VARREF;
bRemoveRef = TRUE;
}
#endif
HB_EXPR_USE( pSelf->value.asList.pExprList, HB_EA_PUSH_PCODE );
HB_EXPR_USE( pSelf->value.asList.pIndex, HB_EA_PUSH_PCODE );
HB_EXPR_GENPCODE1( hb_compGenPCode1, HB_P_ARRAYPOP );
#ifndef HB_C52_STRICT
if( bRemoveRef )
{
pSelf->value.asList.pExprList->ExprType = HB_ET_VARIABLE;
}
#endif
}
break;
@@ -3470,4 +3485,4 @@ static HB_EXPR_FUNC( hb_compExprUsePreDec )
break;
}
return pSelf;
}
}