diff --git a/harbour/ChangeLog b/harbour/ChangeLog index cfdab11abe..e69182ef74 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,21 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-14 20:36 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/rtl/dbedit.prg + * source/rtl/tgetint.prg + * source/rtl/tlabel.prg + * source/rtl/treport.prg + * Changed '&( "{||" + c + "}" )' expressions to + hb_macroBlock() calls. + To me these places seemed safe to change, but + please verify me. + + * source/rtl/alert.prg + * source/rtl/tbcolumn.prg + * source/rtl/tget.prg + * Minor formatting. + 2008-10-14 19:23 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * include/hbextern.ch + Added hb_macroBlock() diff --git a/harbour/source/rtl/alert.prg b/harbour/source/rtl/alert.prg index d8bc551fc6..bd7b8778f7 100644 --- a/harbour/source/rtl/alert.prg +++ b/harbour/source/rtl/alert.prg @@ -92,7 +92,7 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay ) CASE ValType( xMessage ) == "L" ; cMessage := iif( xMessage, ".T.", ".F." ) CASE ValType( xMessage ) == "O" ; cMessage := xMessage:className + " Object" CASE ValType( xMessage ) == "S" ; cMessage := "@" + xMessage:Name + "()" - CASE ValType( xMessage ) == "B" ; cMessage := "{||...}" + CASE ValType( xMessage ) == "B" ; cMessage := "{|| ... }" OTHERWISE ; cMessage := "NIL" ENDCASE diff --git a/harbour/source/rtl/dbedit.prg b/harbour/source/rtl/dbedit.prg index faf4a116d3..67fb34cc68 100644 --- a/harbour/source/rtl/dbedit.prg +++ b/harbour/source/rtl/dbedit.prg @@ -147,7 +147,7 @@ FUNCTION DBEDIT( nTop, nLeft, nBottom, nRight, ; creating codeblocks which are able to _assign_ values, as dbEdit() is a read-only function. [vszakats] */ - bBlock := iif( Type( cBlock ) == "M", {|| " " }, &( "{||" + cBlock + "}" ) ) + bBlock := iif( Type( cBlock ) == "M", {|| " " }, hb_macroBlock( cBlock ) ) /* ; */ diff --git a/harbour/source/rtl/tbcolumn.prg b/harbour/source/rtl/tbcolumn.prg index 66d1f5b02f..c8b6364058 100644 --- a/harbour/source/rtl/tbcolumn.prg +++ b/harbour/source/rtl/tbcolumn.prg @@ -60,7 +60,7 @@ and there is no public class function like TBColumn(). There is in XPP though. */ -#if defined(HB_C52_STRICT) && !defined(HB_COMPAT_XPP) +#if defined( HB_C52_STRICT ) && !defined( HB_COMPAT_XPP ) CREATE CLASS TBColumn STATIC #else CREATE CLASS TBColumn diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index 94226454b7..7f7dd88ed7 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -72,7 +72,7 @@ and there is no public class function like Get(). There is in XPP though. */ -#if defined(HB_C52_STRICT) && !defined(HB_COMPAT_XPP) +#if defined( HB_C52_STRICT ) && !defined( HB_COMPAT_XPP ) CREATE CLASS Get STATIC #else CREATE CLASS Get diff --git a/harbour/source/rtl/tgetint.prg b/harbour/source/rtl/tgetint.prg index 72d92dbd5a..74923f1e1e 100644 --- a/harbour/source/rtl/tgetint.prg +++ b/harbour/source/rtl/tgetint.prg @@ -71,11 +71,11 @@ FUNCTION __GET( bSetGet, cVarName, cPicture, bValid, bWhen ) IF bSetGet == NIL IF FieldPos( cVarName ) > 0 - bSetGet := &( "{|| iif( PCount()==0, FIELD->" + cVarName + ", FIELD->" + cVarName + " := hb_PValue(1) ) }" ) + bSetGet := hb_macroBlock( "iif(PCount()==0,FIELD->" + cVarName + ",FIELD->" + cVarName + ":=hb_PValue(1))" ) ELSEIF __MVEXIST( cVarName ) - bSetGet := {|_1| iif( _1 == NIL, __MVGET( cVarName ), __MVPUT( cVarName, _1 ) ) } + bSetGet := {| _1 | iif( _1 == NIL, __MVGET( cVarName ), __MVPUT( cVarName, _1 ) ) } ELSE - bSetGet := &( "{|| iif( PCount()==0, " + cVarName + ", " + cVarName + " := hb_PValue(1) ) }" ) + bSetGet := hb_macroBlock( "iif(PCount()==0," + cVarName + "," + cVarName + ":=hb_PValue(1))" ) ENDIF ENDIF @@ -92,11 +92,11 @@ FUNCTION __GETA( bGetArray, cVarName, cPicture, bValid, bWhen, aIndex ) IF bGetArray == NIL IF FieldPos( cVarName ) > 0 - bGetArray := &( "{|| FIELD->" + cVarName + "}" ) + bGetArray := hb_macroBlock( "FIELD->" + cVarName ) ELSEIF __MVEXIST( cVarName ) bGetArray := {|| __MVGET( cVarName ) } ELSE - bGetArray := &( "{|| " + cVarName + "}" ) + bGetArray := hb_macroBlock( cVarName ) ENDIF ENDIF diff --git a/harbour/source/rtl/tlabel.prg b/harbour/source/rtl/tlabel.prg index 57ff3e96e0..e790a91c72 100644 --- a/harbour/source/rtl/tlabel.prg +++ b/harbour/source/rtl/tlabel.prg @@ -185,7 +185,7 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ; ENDIF // Execute the actual label run based on matching records - DBEval( { || ::ExecuteLabel() }, bFor, bWhile, nNext, nRecord, lRest ) + DBEval( {|| ::ExecuteLabel() }, bFor, bWhile, nNext, nRecord, lRest ) // Print the last band if there is one IF ::lOneMoreBand @@ -436,7 +436,7 @@ METHOD LoadLabel( cLblFile ) CLASS HBLabelForm AAdd( aLabel[ LBL_FIELDS ], {} ) // Field expression - AAdd( aLabel[ LBL_FIELDS, i ], &( "{ || " + cFieldText + "}" ) ) + AAdd( aLabel[ LBL_FIELDS, i ], hb_macroBlock( cFieldText ) ) // Text of field AAdd( aLabel[ LBL_FIELDS, i ], cFieldText ) diff --git a/harbour/source/rtl/treport.prg b/harbour/source/rtl/treport.prg index e7b25f622e..259d53eb25 100644 --- a/harbour/source/rtl/treport.prg +++ b/harbour/source/rtl/treport.prg @@ -300,7 +300,7 @@ METHOD New( cFrmName, lPrinter, cAltFile, lNoConsole, bFor, bWhile, nNext, nReco ::aGroupTotals := Array( Len(::aReportData[RPT_GROUPS]) ) // Execute the actual report based on matching records - DBEval( { || ::ExecuteReport() }, bFor, bWhile, nNext, nRecord, lRest ) + DBEval( {|| ::ExecuteReport() }, bFor, bWhile, nNext, nRecord, lRest ) // Generate any totals that may have been identified // Make a pass through all the groups @@ -1073,7 +1073,7 @@ METHOD LoadReportFile( cFrmFile ) CLASS HBReportForm // Group expression aReport[ RPT_GROUPS ][ 1 ][ RGT_TEXT ] := cGroupExp - aReport[ RPT_GROUPS ][ 1 ][ RGT_EXP ] := &( "{ || " + cGroupExp + "}" ) + aReport[ RPT_GROUPS ][ 1 ][ RGT_EXP ] := hb_macroBlock( cGroupExp ) IF Used() aReport[ RPT_GROUPS ][ 1 ][ RGT_TYPE ] := ; ValType( Eval( aReport[ RPT_GROUPS ][ 1 ][ RGT_EXP ] ) ) @@ -1099,7 +1099,7 @@ METHOD LoadReportFile( cFrmFile ) CLASS HBReportForm // Subgroup expression aReport[ RPT_GROUPS ][ 2 ][ RGT_TEXT ] := cSubGroupExp - aReport[ RPT_GROUPS ][ 2 ][ RGT_EXP ] := &( "{ || " + cSubGroupExp + "}" ) + aReport[ RPT_GROUPS ][ 2 ][ RGT_EXP ] := hb_macroBlock( cSubGroupExp ) IF Used() aReport[ RPT_GROUPS ][ 2 ][ RGT_TYPE ] := ; ValType( Eval( aReport[ RPT_GROUPS ][ 2 ][ RGT_EXP ] ) ) @@ -1296,7 +1296,7 @@ METHOD GetColumn( cFieldsBuffer, nOffset ) CLASS HBReportForm FIELD_CONTENT_EXPR_OFFSET, 2)) aColumn[ RCT_TEXT ] := ::GetExpr( nPointer ) cExpr := aColumn[ RCT_TEXT ] - aColumn[ RCT_EXP ] := &( "{ || " + cExpr + "}" ) + aColumn[ RCT_EXP ] := hb_macroBlock( cExpr ) // Header expression nPointer := BIN2W(SubStr(cFieldsBuffer, nOffset +;