2011-01-18 12:32 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
! allow to use variable in parenthesis as lvalue when -kc switch
is used - Clipper compatibility
* harbour/contrib/hbfoxpro/misc.prg
+ __FOX_ARRAY( <dims,...> ) which returns array initialized
with .F. values - it can be used to initialize arrays declared
using FP syntax
* harbour/contrib/hbfoxpro/hbfoxpro.ch
+ added some new PP rules for FP array declarations
+ added DISPLAY FIELDS ... command
This commit is contained in:
@@ -16,6 +16,20 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-01-18 12:32 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbexprb.c
|
||||
! allow to use variable in parenthesis as lvalue when -kc switch
|
||||
is used - Clipper compatibility
|
||||
|
||||
* harbour/contrib/hbfoxpro/misc.prg
|
||||
+ __FOX_ARRAY( <dims,...> ) which returns array initialized
|
||||
with .F. values - it can be used to initialize arrays declared
|
||||
using FP syntax
|
||||
|
||||
* harbour/contrib/hbfoxpro/hbfoxpro.ch
|
||||
+ added some new PP rules for FP array declarations
|
||||
+ added DISPLAY FIELDS ... command
|
||||
|
||||
2011-01-17 23:02 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbmxml/hbmxml.c
|
||||
* Reformatted with uncrustify.
|
||||
|
||||
@@ -51,4 +51,34 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* messages in FP */
|
||||
#xtranslate .<!msg!> => :<msg>
|
||||
|
||||
|
||||
/* array declarations */
|
||||
#xtranslate __FP_DIM( <exp> ) => <exp>
|
||||
#xtranslate __FP_DIM( <!name!>( <dim,...> ) ) => <name>\[ <dim> \]
|
||||
|
||||
#command PUBLIC <var1> [, <varN> ] => ;
|
||||
<@> PUBLIC __FP_DIM( <var1> ) [, __FP_DIM( <varN> ) ]
|
||||
#command PRIVATE <var1> [, <varN> ] => ;
|
||||
<@> PRIVATE __FP_DIM( <var1> ) [, __FP_DIM( <varN> ) ]
|
||||
#command DIMENSIONS <!name1!>( <dim1,...> ) [, <!nameN!>( <dimN,...> ) ] => ;
|
||||
PRIVATE <name1>\[ <dim1> \] [, <nameN>\[ <dimN> \] ]
|
||||
|
||||
|
||||
/* workaround for problem with command using FIELDS keyword which can
|
||||
wrongly translate FIELD->fieldname.
|
||||
*/
|
||||
#translate FIELD-><!name!> => _FIELD-><name>
|
||||
|
||||
|
||||
/* commands using FIELDS clause which is not accepted by Clipper */
|
||||
#command DISPLAY [FIELDS <v,...>] [<off:OFF>] ;
|
||||
[<prn:TO PRINTER>] [TO FILE <(f)>] ;
|
||||
[FOR <for>] [WHILE <while>] [NEXT <next>] ;
|
||||
[RECORD <rec>] [<rest:REST>] [<all:ALL>] => ;
|
||||
__dbList( <.off.>, { <{v}> }, <.all.>, ;
|
||||
<{for}>, <{while}>, <next>, ;
|
||||
<rec>, <.rest.>, <.prn.>, <(f)> )
|
||||
|
||||
@@ -69,3 +69,20 @@ FUNCTION SYS( nValue, xPar1 )
|
||||
ENDSWITCH
|
||||
|
||||
RETURN NIL
|
||||
|
||||
|
||||
STATIC PROCEDURE AFILLNESTED( aValue, xVal )
|
||||
LOCAL item
|
||||
|
||||
FOR EACH item in aValue
|
||||
IF hb_isArray( item )
|
||||
AFillNested( item, xVal )
|
||||
ELSE
|
||||
item := xVal
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
RETURN aValue
|
||||
|
||||
FUNCTION __FOX_ARRAY( ... )
|
||||
RETURN AFillNested( Array( ... ), .F. )
|
||||
|
||||
@@ -2544,6 +2544,10 @@ static HB_EXPR_FUNC( hb_compExprUseSetGet )
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asSetGet.pVar = HB_EXPR_USE( pSelf->value.asSetGet.pVar, HB_EA_REDUCE );
|
||||
pSelf->value.asSetGet.pExpr = HB_EXPR_USE( pSelf->value.asSetGet.pExpr, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asSetGet.pVar = hb_compExprListStrip( pSelf->value.asSetGet.pVar, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asSetGet.pVar, HB_EA_LVALUE );
|
||||
break;
|
||||
case HB_EA_ARRAY_AT:
|
||||
@@ -2732,6 +2736,10 @@ static HB_EXPR_FUNC( hb_compExprUsePostInc )
|
||||
{
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
case HB_EA_ARRAY_AT:
|
||||
@@ -2770,6 +2778,10 @@ static HB_EXPR_FUNC( hb_compExprUsePostDec )
|
||||
{
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
case HB_EA_ARRAY_AT:
|
||||
@@ -2929,6 +2941,10 @@ static HB_EXPR_FUNC( hb_compExprUsePlusEq )
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
pSelf->value.asOperator.pRight = HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
|
||||
@@ -2969,6 +2985,10 @@ static HB_EXPR_FUNC( hb_compExprUseMinusEq )
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
pSelf->value.asOperator.pRight = HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
|
||||
@@ -3009,6 +3029,10 @@ static HB_EXPR_FUNC( hb_compExprUseMultEq )
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
pSelf->value.asOperator.pRight = HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
|
||||
@@ -3049,6 +3073,10 @@ static HB_EXPR_FUNC( hb_compExprUseDivEq )
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
pSelf->value.asOperator.pRight = HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
|
||||
@@ -3089,6 +3117,10 @@ static HB_EXPR_FUNC( hb_compExprUseModEq )
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
pSelf->value.asOperator.pRight = HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
|
||||
@@ -3129,6 +3161,10 @@ static HB_EXPR_FUNC( hb_compExprUseExpEq )
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
pSelf->value.asOperator.pRight = HB_EXPR_USE( pSelf->value.asOperator.pRight, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
|
||||
@@ -4334,6 +4370,10 @@ static HB_EXPR_FUNC( hb_compExprUsePreInc )
|
||||
{
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
|
||||
@@ -4374,6 +4414,10 @@ static HB_EXPR_FUNC( hb_compExprUsePreDec )
|
||||
{
|
||||
case HB_EA_REDUCE:
|
||||
pSelf->value.asOperator.pLeft = HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_REDUCE );
|
||||
#if ! defined( HB_MACRO_SUPPORT )
|
||||
if( !HB_SUPPORT_HARBOUR )
|
||||
pSelf->value.asOperator.pLeft = hb_compExprListStrip( pSelf->value.asOperator.pLeft, HB_COMP_PARAM );
|
||||
#endif
|
||||
HB_EXPR_USE( pSelf->value.asOperator.pLeft, HB_EA_LVALUE );
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user