diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b74778add5..0dbf9cfd9b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,88 @@ The license applies to all entries newer than 2009-04-28. */ +2012-09-30 23:08 UTC+0200 Viktor Szakats (harbour syenar.net) + + contrib/hbct/tests/dates4.prg + - tests/dates4.prg + * contrib/hbnf/byt2bit.prg + * contrib/hbnf/dectobin.prg + * contrib/hbnf/popadder.prg + * tests/ac_test2.prg + * tests/ainstest.prg + * tests/and_or.prg + * tests/array16.prg + * tests/arrays.prg + * tests/begin.prg + * tests/byref.prg + * tests/calling.prg + * tests/clasinh.prg + * tests/clasinit.prg + * tests/classes.prg + * tests/clsnv.prg + * tests/codebloc.prg + * tests/dates.prg + * tests/debugtst.prg + * tests/destruct.prg + * tests/dirtest.prg + * tests/dynobj.prg + * tests/exittest.prg + * tests/fib.prg + * tests/files.prg + * tests/fornext.prg + * tests/fsplit.prg + * tests/gtchars.prg + * tests/ifelse.prg + * tests/inherit.prg + * tests/inifiles.prg + * tests/initexit.prg + * tests/inkeytst.prg + * tests/inline.prg + * tests/iotest.prg + * tests/iotest2.prg + * tests/longdev.prg + * tests/longstr2.prg + * tests/memvar.prg + * tests/multiarg.prg + * tests/newrdd.prg + * tests/nums.prg + * tests/objasign.prg + * tests/objects.prg + * tests/overload.prg + * tests/passref.prg + * tests/procname.prg + * tests/readhrb.prg + * tests/returns.prg + * tests/rto_get.prg + * tests/rto_tb.prg + * tests/sbartest.prg + * tests/setkeys.prg + * tests/speed.prg + * tests/statfun.prg + * tests/statics.prg + * tests/stripem.prg + * tests/switch.prg + * tests/tb1.prg + * tests/test_all.prg + * tests/testbrw.prg + * tests/testcls.prg + * tests/testerro.prg + * tests/testfor.prg + * tests/testmem.prg + * tests/testntx.prg + * tests/testop.prg + * tests/testpp.prg + * tests/testrdd2.prg + * tests/teststr.prg + * tests/testvars.prg + * tests/testwarn.prg + * tests/tstasort.prg + * tests/tstdbi.prg + * tests/tstmacro.prg + * tests/varparam.prg + * tests/vidtest.prg + * various cleanups, fixes and formatting + now most tests are warning and error free + 2012-09-30 14:51 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/gtalleg/gtalleg.hbc * contrib/gtwvg/gtwvg.hbc diff --git a/harbour/tests/dates4.prg b/harbour/contrib/hbct/tests/dates4.prg similarity index 84% rename from harbour/tests/dates4.prg rename to harbour/contrib/hbct/tests/dates4.prg index d918894767..287f7a05d5 100644 --- a/harbour/tests/dates4.prg +++ b/harbour/contrib/hbct/tests/dates4.prg @@ -10,18 +10,18 @@ PROCEDURE Main() LOCAL i LOCAL dDate := Date() - SET( _SET_DATEFORMAT, "dd/mm/yyyy" ) + SET DATE ANSI - for i := 7 TO 49 STEP 7 + FOR i := 7 TO 49 STEP 7 CheckDate( dDate ) dDate += i - next + NEXT RETURN FUNCTION CheckDate( dDate ) - OutStd( "Testing date:", dDate , hb_eol() ) + OutStd( "Testing date:", dDate, hb_eol() ) OutStd( "Days in month..:", daysinmonth( dDate ), hb_eol() ) OutStd( "Day of year....:", doy( dDate ), hb_eol() ) OutStd( "Begin of month.:", bom( dDate ), hb_eol() ) @@ -33,4 +33,4 @@ FUNCTION CheckDate( dDate ) __Accept( "Press ENTER to continue..." ) OutStd( Chr( 10 ), Chr( 10 ) ) - RETURN nil + RETURN NIL diff --git a/harbour/contrib/hbnf/byt2bit.prg b/harbour/contrib/hbnf/byt2bit.prg index a42ca8e574..904e1882d8 100644 --- a/harbour/contrib/hbnf/byt2bit.prg +++ b/harbour/contrib/hbnf/byt2bit.prg @@ -29,7 +29,7 @@ FUNCTION FT_BYT2BIT( cByte ) IF HB_ISSTRING( cByte ) xBitString := "" - FOR nCounter := 7 TO 0 step - 1 + FOR nCounter := 7 TO 0 STEP -1 xBitString += iif( FT_ISBIT( cByte, nCounter ), "1", "0" ) NEXT ELSE diff --git a/harbour/contrib/hbnf/dectobin.prg b/harbour/contrib/hbnf/dectobin.prg index 6e5521cfc5..4179ef821f 100644 --- a/harbour/contrib/hbnf/dectobin.prg +++ b/harbour/contrib/hbnf/dectobin.prg @@ -27,7 +27,7 @@ FUNCTION FT_DEC2BIN( x ) LOCAL i, buffer := { "0", "0", "0", "0", "0", "0", "0", "0" } - FOR i := 8 TO 1 step - 1 + FOR i := 8 TO 1 STEP -1 IF x >= 2 ^ ( i - 1 ) x -= 2 ^ ( i - 1 ) buffer[ 9 - i ] := "1" diff --git a/harbour/contrib/hbnf/popadder.prg b/harbour/contrib/hbnf/popadder.prg index f74441a061..45038bf281 100644 --- a/harbour/contrib/hbnf/popadder.prg +++ b/harbour/contrib/hbnf/popadder.prg @@ -1374,11 +1374,11 @@ STATIC FUNCTION _ftStuffComma( cStrToStuff, lTrimStuffedStr ) IF Len( Left( LTrim(_ftCharRem("-",cStrToStuff ) ), ; At( ".", LTrim( _ftCharRem("-",cStrToStuff ) ) ) - 1 ) ) > 3 IF lTrimStuffedStr // Do we trim the number each time we insert a comma - FOR x := nDecPosit - 3 TO 2 + _ftCountLeft( cStrToStuff, " " ) STEP - 4 + FOR x := nDecPosit - 3 TO 2 + _ftCountLeft( cStrToStuff, " " ) STEP -4 cStrToStuff := SubStr( _ftPosIns( cStrToStuff,",",x ), 2 ) NEXT ELSE - FOR x := nDecPosit - 3 TO 2 + _ftCountLeft( cStrToStuff, " " ) STEP - 3 + FOR x := nDecPosit - 3 TO 2 + _ftCountLeft( cStrToStuff, " " ) STEP -3 cStrToStuff := _ftPosIns( cStrToStuff, ",", x ) NEXT ENDIF diff --git a/harbour/tests/ac_test2.prg b/harbour/tests/ac_test2.prg index 6979968be7..1f7d0d5fbb 100644 --- a/harbour/tests/ac_test2.prg +++ b/harbour/tests/ac_test2.prg @@ -21,6 +21,8 @@ #include "inkey.ch" #include "achoice.ch" +MEMVAR lHiLiTest + PROCEDURE Main() // NIL, empty, numeric, and "not handled" - items @@ -83,11 +85,13 @@ FUNCTION cUF( nMode, nCurElement, nRowPos ) LOCAL nRetVal := AC_CONT LOCAL nKey := LastKey() + HB_SYMBOL_UNUSED( nCurElement ) + HB_SYMBOL_UNUSED( nRowPos ) + IF lHiLiTest DispBox( 0, 0, MaxRow(), MaxCol(), Replicate( "#", 9 ), "GR+/G" ) ENDIF - IF nMode == AC_NOITEM nRetVal := AC_ABORT ELSEIF nMode == AC_EXCEPT @@ -109,6 +113,9 @@ FUNCTION cUF2( nMode, nCurElement, nRowPos ) LOCAL nRetVal := AC_CONT LOCAL nKey := LastKey() + HB_SYMBOL_UNUSED( nCurElement ) + HB_SYMBOL_UNUSED( nRowPos ) + DispBox( 0, 0, MaxRow(), MaxCol(), Replicate( "!", 9 ), "GR+/G" ) IF nMode == AC_NOITEM diff --git a/harbour/tests/ainstest.prg b/harbour/tests/ainstest.prg index 45cc1d7b58..9d10ee08be 100644 --- a/harbour/tests/ainstest.prg +++ b/harbour/tests/ainstest.prg @@ -90,4 +90,4 @@ FUNCTION aDump( aShow ) NEXT QQOut( hb_eol() ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/and_or.prg b/harbour/tests/and_or.prg index 73cb60b6e4..263e05e86a 100644 --- a/harbour/tests/and_or.prg +++ b/harbour/tests/and_or.prg @@ -39,4 +39,4 @@ FUNCTION AndOr( lValue1, lValue2 ) QOut( "None of them are true" ) ENDIF - RETURN nil + RETURN NIL diff --git a/harbour/tests/array16.prg b/harbour/tests/array16.prg index a417d0842d..27f3fde77d 100644 --- a/harbour/tests/array16.prg +++ b/harbour/tests/array16.prg @@ -41,19 +41,19 @@ PROCEDURE Main() QOut( Len( b ) ) b[ 100 ] := 10 - Test( b[ 100 ] ++ ) + Test( b[ 100 ]++ ) QOut( b[ 100 ] ) b[ 100 ] := 10 - Test( ++ b[ 100 ] ) + Test( ++b[ 100 ] ) QOut( b[ 100 ] ) b := { 1, { 2, { 4, 5 } } } - Test( b[ 2 ][ 2 ][ 1 ] ++ ) + Test( b[ 2 ][ 2 ][ 1 ]++ ) QOut( b[ 2 ][ 2 ][ 1 ] ) b[ 2 ][ 2 ][ 1 ] := 2 - Test( ++ b[ 2 ][ 2 ][ 1 ] ) + Test( ++b[ 2 ][ 2 ][ 1 ] ) QOut( b[ 2 ][ 2 ][ 1 ] ) ReleaseTest() @@ -64,10 +64,12 @@ FUNCTION Test( n ) QOut( n ) - RETURN nil + RETURN NIL FUNCTION ReleaseTest() LOCAL a := { 1, 2, 3 } - RETURN nil + HB_SYMBOL_UNUSED( a ) + + RETURN NIL diff --git a/harbour/tests/arrays.prg b/harbour/tests/arrays.prg index a68874c96c..cc0ad71f2f 100644 --- a/harbour/tests/arrays.prg +++ b/harbour/tests/arrays.prg @@ -62,10 +62,12 @@ FUNCTION Test( n ) QOut( n ) - RETURN nil + RETURN NIL FUNCTION ReleaseTest() LOCAL a := { 1, 2, 3 } - RETURN nil + HB_SYMBOL_UNUSED( a ) + + RETURN NIL diff --git a/harbour/tests/begin.prg b/harbour/tests/begin.prg index c4761dd7e3..8cf67c4589 100644 --- a/harbour/tests/begin.prg +++ b/harbour/tests/begin.prg @@ -85,8 +85,6 @@ PROCEDURE Break1() BREAK M->mPrivate - RETURN - PROCEDURE Break2() BEGIN SEQUENCE @@ -130,5 +128,3 @@ PROCEDURE Break4( cValue ) LOCAL oLocal := " detached Break4 " Break( {| x | oLocal + x + cValue } ) - - RETURN diff --git a/harbour/tests/byref.prg b/harbour/tests/byref.prg index 639461c823..d9074c92c1 100644 --- a/harbour/tests/byref.prg +++ b/harbour/tests/byref.prg @@ -30,7 +30,7 @@ FUNCTION ref1( x ) Ref2( @x ) QOut( " In ref1 after ref2 =", x ) - RETURN nil + RETURN NIL FUNCTION ref2( x ) @@ -39,7 +39,7 @@ FUNCTION ref2( x ) Ref3( @x ) QOut( " In ref2 after ref3 =", x ) - RETURN nil + RETURN NIL FUNCTION ref3( x ) @@ -51,11 +51,11 @@ FUNCTION ref3( x ) Ref4( @a ) QOut( " In ref3 after ref4 =", x ) - RETURN nil + RETURN NIL FUNCTION ref4( a ) a[ 1 ]++ QOut( " In ref4 =", a[ 1 ] ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/calling.prg b/harbour/tests/calling.prg index 08e7c7f39d..d57b8fd5b2 100644 --- a/harbour/tests/calling.prg +++ b/harbour/tests/calling.prg @@ -20,16 +20,16 @@ FUNCTION SecondOne() Third() - RETURN nil + RETURN NIL FUNCTION Third() QOut( "Ok, this is from Third() function call" ) - RETURN nil + RETURN NIL FUNCTION Fourth( cText ) QOut( cText ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/clasinh.prg b/harbour/tests/clasinh.prg index 7052887d02..ba30040663 100644 --- a/harbour/tests/clasinh.prg +++ b/harbour/tests/clasinh.prg @@ -11,6 +11,9 @@ PROCEDURE Main() oObject := TAnyClass():New() oBase := TClassBase():New() + HB_SYMBOL_UNUSED( oObject ) + HB_SYMBOL_UNUSED( oBase ) + RETURN CREATE CLASS TClassBase diff --git a/harbour/tests/clasinit.prg b/harbour/tests/clasinit.prg index d261a89c63..d9e811d663 100644 --- a/harbour/tests/clasinit.prg +++ b/harbour/tests/clasinit.prg @@ -28,7 +28,7 @@ FUNCTION TForm() STATIC oClass - IF oClass == nil + IF oClass == NIL oClass := HBClass():New( "TFORM" ) // starts a new class definition oClass:AddData( "cName" ) // define this class objects datas @@ -59,4 +59,4 @@ STATIC FUNCTION Show() QOut( "lets show a form from here :-)" ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/classes.prg b/harbour/tests/classes.prg index 684966459a..c39af9d3e8 100644 --- a/harbour/tests/classes.prg +++ b/harbour/tests/classes.prg @@ -18,7 +18,7 @@ FUNCTION TForm() STATIC oClass - IF oClass == nil + IF oClass == NIL oClass := HBClass():New( "TFORM" ) // starts a new class definition oClass:AddData( "cName" ) // define this class objects datas @@ -52,4 +52,4 @@ STATIC FUNCTION Show() QOut( "lets show a form from here :-)" ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/clsnv.prg b/harbour/tests/clsnv.prg index df55d47645..44539b88f8 100644 --- a/harbour/tests/clsnv.prg +++ b/harbour/tests/clsnv.prg @@ -18,7 +18,7 @@ PROCEDURE Main() - LOCAL o := myclass3():new(), i, cbErr + LOCAL o := myclass3():new() ? Date(), Time(), Version(), OS() ? diff --git a/harbour/tests/codebloc.prg b/harbour/tests/codebloc.prg index d7abb83c98..29816db594 100644 --- a/harbour/tests/codebloc.prg +++ b/harbour/tests/codebloc.prg @@ -14,6 +14,8 @@ PROCEDURE Main() LOCAL YY, X LOCAL x1, x2 + HB_SYMBOL_UNUSED( b ) + OutStd( "this should print first" ) OutStd( hb_eol() ) @@ -47,7 +49,7 @@ PROCEDURE Main() OutStd( ar[ 1 ] ) OutStd( hb_eol() ) - a := {|| ar[ 1 ] ++ } + a := {|| ar[ 1 ]++ } Eval( a ) OutStd( ar[ 1 ] ) OutStd( hb_eol() ) diff --git a/harbour/tests/dates.prg b/harbour/tests/dates.prg index 6f272637f4..46802d2034 100644 --- a/harbour/tests/dates.prg +++ b/harbour/tests/dates.prg @@ -15,18 +15,18 @@ PROCEDURE Main() TestCentury() OutStd( hb_eol(), "" ) - OutStd( hb_eol(), "dDate := CToD( '02/04/1999' ) =>", dDate := CToD( "02/04/1999" ) ) + OutStd( hb_eol(), "dDate := CToD( '02/04/1999' ) =>", dDate := CToD( "02/04/1999" ) ) - OutStd( hb_eol(), "ValType( dDate ) =", ValType( dDate ) ) + OutStd( hb_eol(), "ValType( dDate ) =", ValType( dDate ) ) - OutStd( hb_eol(), "Day( dDate ) =", Day( dDate ) ) - OutStd( hb_eol(), "Month( dDate ) =", Month( dDate ) ) - OutStd( hb_eol(), "Year( dDate ) =", Year( dDate ), hb_eol() ) + OutStd( hb_eol(), "Day( dDate ) =", Day( dDate ) ) + OutStd( hb_eol(), "Month( dDate ) =", Month( dDate ) ) + OutStd( hb_eol(), "Year( dDate ) =", Year( dDate ), hb_eol() ) - OutStd( hb_eol(), "dDate + 5 =", dDate2 := dDate + 5 ) - OutStd( hb_eol(), "dDate - 5 =", dDate - 5, hb_eol() ) + OutStd( hb_eol(), "dDate + 5 =", dDate2 := dDate + 5 ) + OutStd( hb_eol(), "dDate - 5 =", dDate - 5, hb_eol() ) - OutStd( hb_eol(), "dDate2 - dDate =", dDate2 - dDate ) + OutStd( hb_eol(), "dDate2 - dDate =", dDate2 - dDate ) OutStd( hb_eol(), "" ) OutStd( hb_eol(), dDate, DToS( dDate ) ) diff --git a/harbour/tests/debugtst.prg b/harbour/tests/debugtst.prg index 2d6c334b7d..c5e4751f8a 100644 --- a/harbour/tests/debugtst.prg +++ b/harbour/tests/debugtst.prg @@ -17,6 +17,8 @@ * Placed in the public domain */ +#pragma warninglevel=1 + PROCEDURE Main() LOCAL oForm := TForm():New() @@ -101,7 +103,7 @@ FUNCTION FuncSecond( nParam, cParam, uParam ) Pause() - RETURN nil + RETURN NIL /* $Doc$ @@ -113,7 +115,7 @@ FUNCTION TForm() STATIC oClass - IF oClass == nil + IF oClass == NIL oClass := HBClass():New( "TFORM" ) // starts a new class definition oClass:AddData( "cName" ) // define this class objects datas @@ -162,67 +164,67 @@ STATIC FUNCTION Show() QOut( "lets show a form from here :-)" ) - RETURN nil + RETURN NIL - // - // TForm:Transfer( [] ) - // - // Generic object import and export function - // - // is present. - // - // Maximum number of arguments passed is limited to 10 ! - // - // An argument can be one of the following : - // - // { , } Set DATA to - // { { , }, { , }, ... } - // Set a whole list symbols to value - // Normal way of set objects from external - // sources, like memo files. - // Set self according to the DATA - // contained in - // Can be used to transfer info from - // one class to another - // - // If is not present, the current object will be returned as an array - // for description see __objSetValueList / __objGetValueList. - // - // The method aExcept() is called to determine the DATA which should not - // be returned. Eg. hWnd ( do not copy this DATA from external source ) - // - // Say we want to copy oSource into oTarget we say : - // - // oTarget:Transfer( oSource ) - // - // If we do not want 'cName' duplicated we have to use __objGetValueList : - // - // aNewExcept := aClone( oSource:aExcept() ) - // aAdd( aNewExcept, "cName" ) /* Add cName to exception list */ - // oTarget:Transfer( __objGetValueList( oSource, aNewExcept ) ) - // /* Get DATA from oSource with new exceptions */ - // /* Transfer DATA to oTarget */ - // - // To set two DATA of oTarget : - // - // oTarget:Transfer( { "nLeft", 10 }, { "nRight", 5 } ) - // - // or : - // - // aCollect := {} - // aAdd( aCollect, { "nLeft" , 10 } ) - // aAdd( aCollect, { "nRight", 5 } ) - // oTarget:Transfer( aCollect ) - // - // Copy oSource to a memo field : - // - // DbObject->Memo := oSource:Transfer() - // - // (Re)create oTarget from the memo field : - // - // oTarget := TTarget():New() - // oTarget:Transfer( DbObject->Memo ) - // +// +// TForm:Transfer( [] ) +// +// Generic object import and export function +// +// is present. +// +// Maximum number of arguments passed is limited to 10 ! +// +// An argument can be one of the following : +// +// { , } Set DATA to +// { { , }, { , }, ... } +// Set a whole list symbols to value +// Normal way of set objects from external +// sources, like memo files. +// Set self according to the DATA +// contained in +// Can be used to transfer info from +// one class to another +// +// If is not present, the current object will be returned as an array +// for description see __objSetValueList / __objGetValueList. +// +// The method aExcept() is called to determine the DATA which should not +// be returned. Eg. hWnd ( do not copy this DATA from external source ) +// +// Say we want to copy oSource into oTarget we say : +// +// oTarget:Transfer( oSource ) +// +// If we do not want 'cName' duplicated we have to use __objGetValueList : +// +// aNewExcept := aClone( oSource:aExcept() ) +// aAdd( aNewExcept, "cName" ) /* Add cName to exception list */ +// oTarget:Transfer( __objGetValueList( oSource, aNewExcept ) ) +// /* Get DATA from oSource with new exceptions */ +// /* Transfer DATA to oTarget */ +// +// To set two DATA of oTarget : +// +// oTarget:Transfer( { "nLeft", 10 }, { "nRight", 5 } ) +// +// or : +// +// aCollect := {} +// aAdd( aCollect, { "nLeft" , 10 } ) +// aAdd( aCollect, { "nRight", 5 } ) +// oTarget:Transfer( aCollect ) +// +// Copy oSource to a memo field : +// +// DbObject->Memo := oSource:Transfer() +// +// (Re)create oTarget from the memo field : +// +// oTarget := TTarget():New() +// oTarget:Transfer( DbObject->Memo ) +// STATIC FUNCTION Transfer( x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 ) /* etc */ @@ -236,7 +238,7 @@ STATIC FUNCTION Transfer( x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 ) /* etc */ IF nLen == 0 xRet := __objGetValueLIST( self, ::aExcept() ) ELSE - for n := 1 TO nLen + FOR n := 1 TO nLen xData := aParam[ n ] IF ValType( xData ) == "A" @@ -253,7 +255,7 @@ STATIC FUNCTION Transfer( x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 ) /* etc */ QOut( "TRANSFER: Incorrect argument(", n, ") ", xData ) ENDIF - next n + NEXT ENDIF RETURN xRet diff --git a/harbour/tests/destruct.prg b/harbour/tests/destruct.prg index 5d5fb68035..5547e91cb8 100644 --- a/harbour/tests/destruct.prg +++ b/harbour/tests/destruct.prg @@ -56,7 +56,7 @@ STATIC PROCEDURE SIMPLETEST( type ) ? "=> o := NIL" BEGIN SEQUENCE o := NIL - end + END RETURN @@ -68,8 +68,8 @@ STATIC PROCEDURE GCFREETEST( type ) ? "=> o := myClass():new( " + hb_ntos( type ) + " )" o := myClass():new( type ) ? "=> o:className() ->", o:className() - ? "=> create corss reference: a := { o, nil }; a[ 2 ] := a; a := NIL" - a := { o, nil }; a[ 2 ] := a; a := NIL + ? "=> create corss reference: a := { o, NIL }; a[ 2 ] := a; a := NIL" + a := { o, NIL }; a[ 2 ] := a; a := NIL ? "=> o := NIL" BEGIN SEQUENCE o := NIL diff --git a/harbour/tests/dirtest.prg b/harbour/tests/dirtest.prg index 190dc4ea61..247315a541 100644 --- a/harbour/tests/dirtest.prg +++ b/harbour/tests/dirtest.prg @@ -8,8 +8,8 @@ PROCEDURE Main( filespec, attribs, cshort ) - LOCAL aDir := {} - LOCAL x := 0, lShort := .F. + LOCAL aDir + LOCAL x, lShort := .F. IF ! cshort == NIL .AND. ( Upper( cShort ) == "TRUE" .OR. Upper( cShort ) == ".T." ) lShort := .T. diff --git a/harbour/tests/dynobj.prg b/harbour/tests/dynobj.prg index 7771301410..d6a41cd3e1 100644 --- a/harbour/tests/dynobj.prg +++ b/harbour/tests/dynobj.prg @@ -16,7 +16,6 @@ PROCEDURE Main() LOCAL oForm := TForm():New() - LOCAL nSeq QOut( "What methods are in the class :" ) Debug( __objGetMethodList( oForm ) ) @@ -110,7 +109,7 @@ FUNCTION TForm() STATIC oClass - IF oClass == nil + IF oClass == NIL oClass := HBClass():New( "TFORM" ) // starts a new class definition oClass:AddData( "cText" ) // define this class objects datas @@ -142,7 +141,7 @@ STATIC FUNCTION Smile() LOCAL self := QSelf() - if ::CalcArea() == 300 + IF ::CalcArea() == 300 QOut( ":-)" ) ELSE QOut( ":-(" ) @@ -162,4 +161,4 @@ FUNCTION Pause() __Accept( "Pause :" ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/exittest.prg b/harbour/tests/exittest.prg index 4954215192..8343c75268 100644 --- a/harbour/tests/exittest.prg +++ b/harbour/tests/exittest.prg @@ -9,7 +9,7 @@ PROCEDURE Main() LOCAL x := 0 DO WHILE x < 10 - ++ x + ++x IF x == 5 EXIT ENDIF diff --git a/harbour/tests/fib.prg b/harbour/tests/fib.prg index 47a039f258..234705323a 100644 --- a/harbour/tests/fib.prg +++ b/harbour/tests/fib.prg @@ -39,7 +39,7 @@ FUNCTION FibI( n ) nFib := nFibMin1 + nFibMinN1 nFibMinN1 := nFibMin1 nFibMin1 := nFib - ++ i + ++i ENDDO ENDIF diff --git a/harbour/tests/files.prg b/harbour/tests/files.prg index 698476df73..535cd9330c 100644 --- a/harbour/tests/files.prg +++ b/harbour/tests/files.prg @@ -11,21 +11,21 @@ // use only *one* at a time // dejar solo una de las dos lineas siguientes: -#define CON_DBFCDX -//#define CON_ADS +#define WITH_DBFCDX +//#define WITH_ADS -#ifdef CON_ADS +#ifdef WITH_ADS #include "ads.ch" REQUEST _ADS #endif -STATIC aCampos := { {"Codigo", "C", 6, 0}, {"Nombre", "C", 35, 0} } +PROCEDURE Main() -PROCEDURE FILES() + LOCAL aCampos := { { "Codigo", "C", 6, 0 }, { "Nombre", "C", 35, 0 } } - Local n := 0, h:=Array(NFILES) + LOCAL n := 0, h := Array( NFILES ) -#ifdef CON_ADS +#ifdef WITH_ADS rddRegister( "ADS", 1 ) rddsetdefault( "ADS" ) @@ -33,7 +33,7 @@ PROCEDURE FILES() SET FILETYPE TO CDX SET CHARTYPE TO OEM SET AXS LOCKING ON - AdsRightsCheck(.F.) + AdsRightsCheck( .F. ) #endif @@ -41,12 +41,12 @@ PROCEDURE FILES() AFill( h, 0 ) DO WHILE n < NFILES n++ - @10,0 SAY "Building files.... "+Str( n ) - DbCreate( "File" + LTrim( Str( n ) ), aCampos ) - USE ( "File" + LTrim( Str( n ) ) ) NEW + @ 10, 0 SAY "Building files.... " + Str( n ) + dbCreate( "file" + LTrim( Str( n ) ), aCampos ) + USE ( "file" + LTrim( Str( n ) ) ) NEW -#ifdef CON_ADS - INDEX ON CODIGO TAG CODIGO TO ( "File" + LTrim( Str( n ) ) ) +#ifdef WITH_ADS + INDEX ON CODIGO TAG CODIGO TO ( "file" + LTrim( Str( n ) ) ) #endif CLOSE DATA @@ -56,10 +56,10 @@ PROCEDURE FILES() DO WHILE n < NFILES n++ - @12,0 SAY "Opening files.... "+Str( n ) - USE ( "File" + LTrim( Str( n ) ) ) NEW + @ 12, 0 SAY "Opening files.... " + Str( n ) + USE ( "file" + LTrim( Str( n ) ) ) NEW - #ifdef CON_ADS + #ifdef WITH_ADS SET ORDER TO TAG CODIGO #endif @@ -71,8 +71,8 @@ PROCEDURE FILES() DO WHILE n < NFILES n++ - @14,0 SAY "Deleting files.... "+Str( n ) - FErase ( "File" + LTrim( Str( n ) ) + ".dbf" ) + @ 14, 0 SAY "Deleting files.... " + Str( n ) + FErase( "file" + LTrim( Str( n ) ) + ".dbf" ) ENDDO -RETURN NIL + RETURN diff --git a/harbour/tests/fornext.prg b/harbour/tests/fornext.prg index 2dc6f6c985..bc014ca367 100644 --- a/harbour/tests/fornext.prg +++ b/harbour/tests/fornext.prg @@ -12,7 +12,7 @@ PROCEDURE Main() - LOCAL n := 1 + LOCAL n QOut( "Testing Harbour For Next loops. Going up quick" ) @@ -22,7 +22,7 @@ PROCEDURE Main() QOut( "Going down" ) - FOR n := 10 TO 1 step - 1 + FOR n := 10 TO 1 STEP -1 QOut( n ) NEXT n @@ -34,7 +34,7 @@ PROCEDURE Main() QOut( "No production" ) - FOR n := 1 TO 10 step - 1 + FOR n := 1 TO 10 STEP -1 QOut( n ) NEXT n diff --git a/harbour/tests/fsplit.prg b/harbour/tests/fsplit.prg index b3cc0dcc16..9aecc679be 100644 --- a/harbour/tests/fsplit.prg +++ b/harbour/tests/fsplit.prg @@ -14,13 +14,12 @@ FUNCTION fsplit( csource, csplit, nbyte ) LOCAL i // general counter LOCAL ccommand := "" // dos command for joining files - LOCAL cexist := "" // batch file error checker - LOCAL nbufsize := 8 // default buffer Read/Write size - LOCAL hsource := 0 // file handle for source file - LOCAL hdestination := 0 // file handle for destination file + LOCAL nbufsize // default buffer Read/Write size + LOCAL hsource // file handle for source file + LOCAL hdestination // file handle for destination file LOCAL cbuffer := "" // buffer for read/write LOCAL lsplit := .F. // return value - LOCAL nblock := 0 // bytes read + LOCAL nblock // bytes read LOCAL ncurrent := 0 // total bytes copied LOCAL nsplit := 1 // destination file name extension LOCAL cbat := "join.bat" // for joining split files @@ -28,8 +27,8 @@ FUNCTION fsplit( csource, csplit, nbyte ) LOCAL hbat // file handle for join.bat LOCAL afile := {} // for information upon completion LOCAL nseconds := Seconds() // time elapsed - LOCAL nfilesize := 0 // file size to be split - LOCAL hfile := 0 // split file sizes + LOCAL nfilesize // file size to be split + LOCAL hfile // split file sizes LOCAL cret := Chr( 13 ) + Chr( 10 ) // carriage return LOCAL ctmp := "@echo off" + cret // 1st line in join.bat LOCAL nfile @@ -45,7 +44,7 @@ FUNCTION fsplit( csource, csplit, nbyte ) ENDIF // default destination name - csplit := iif( csplit == nil, "split.", csplit + "." ) + csplit := iif( csplit == NIL, "split.", csplit + "." ) // default size of each split file 360 x 1024 bytes nbufsize := iif( Empty( nbyte ), 360, nbyte ) @@ -65,7 +64,7 @@ FUNCTION fsplit( csource, csplit, nbyte ) hbat := FCreate( cbat ) // join.bat IF hbat != F_ERROR ELSE - break + BREAK ENDIF ctmp += "rem source file " + csource + " size " + hb_ntos( nfilesize ) + cret ctmp += "rem split on " + DToC( Date() ) + " " + Time() + cret diff --git a/harbour/tests/gtchars.prg b/harbour/tests/gtchars.prg index 4a5e63c820..2db184e000 100644 --- a/harbour/tests/gtchars.prg +++ b/harbour/tests/gtchars.prg @@ -92,4 +92,4 @@ FUNCTION dspboxch( cStr ) SetPos( r, c + 1 ) NEXT - RETURN nil + RETURN NIL diff --git a/harbour/tests/ifelse.prg b/harbour/tests/ifelse.prg index 55d5de8c7e..ae8d19b7d5 100644 --- a/harbour/tests/ifelse.prg +++ b/harbour/tests/ifelse.prg @@ -35,4 +35,4 @@ FUNCTION TestValue( x ) QOut( "Ok!" ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/inherit.prg b/harbour/tests/inherit.prg index a769712326..6c63529f82 100644 --- a/harbour/tests/inherit.prg +++ b/harbour/tests/inherit.prg @@ -15,6 +15,8 @@ * Placed in the public domain */ +#xtranslate Default( , ) => iif( == NIL, , ) + PROCEDURE Main() LOCAL oFrom @@ -149,16 +151,16 @@ FUNCTION New( cFileName, cMode, nBlock ) ::cFileName := cFileName ::cMode := Default( cMode, "R" ) - if ::cMode == "R" + IF ::cMode == "R" ::hFile := FOpen( cFileName ) - elseif ::cMode == "W" + ELSEIF ::cMode == "W" ::hFile := FCreate( cFileName ) ELSE QOut( "DosFile Init: Unknown file mode:", ::cMode ) ENDIF ::nError := FError() - if ::nError != 0 + IF ::nError != 0 ::lEoF := .T. QOut( "Error ", ::nError ) ENDIF @@ -171,7 +173,7 @@ FUNCTION RUN( xTxt, lCRLF ) LOCAL self := QSelf() LOCAL xRet - if ::cMode == "R" + IF ::cMode == "R" xRet := ::Read() ELSE xRet := ::WriteLn( xTxt, lCRLF ) @@ -188,11 +190,11 @@ FUNCTION Dispose() LOCAL self := QSelf() ::cBlock := NIL - if ::hFile != - 1 - if ::cMode == "W" .AND. ::nError != 0 + IF ::hFile != - 1 + IF ::cMode == "W" .AND. ::nError != 0 ::Write( Chr( 26 ) ) // Do not forget EOF marker ENDIF - IF !FClose( ::hFile ) + IF ! FClose( ::hFile ) ::nError := FError() QOut( "Dos Error closing ", ::cFileName, " Code ", ::nError ) ENDIF @@ -211,11 +213,10 @@ FUNCTION READ() LOCAL cBlock LOCAL nCrPos LOCAL nEoFPos - LOCAL nRead - if ::hFile == - 1 + IF ::hFile == - 1 QOut( "DosFile:Read : No file open" ) - elseif ::cMode != "R" + ELSEIF ::cMode != "R" QOut( "File ", ::cFileName, " not open for reading" ) ELSEIF !::lEoF @@ -230,7 +231,7 @@ FUNCTION READ() ENDIF IF !::lEoF - ::nLine ++ + ::nLine++ nCRPos := At( Chr( 10 ), ::cBlock ) IF nCRPos != 0 // More than one line read cRet := SubStr( ::cBlock, 1, nCRPos - 1 ) @@ -267,13 +268,13 @@ FUNCTION WriteLn( xTxt, lCRLF ) LOCAL self := QSelf() LOCAL cBlock - if ::hFile == - 1 + IF ::hFile == -1 QOut( "DosFile:Write : No file open" ) - elseif ::cMode != 'W' + ELSEIF !( ::cMode == "W" ) QOut( "File ", ::cFileName, " not opened for writing" ) ELSE cBlock := ToChar( xTxt ) // Convert to string - IF DEFAULT( lCRLF, .T. ) + IF Default( lCRLF, .T. ) cBlock += Chr( 10 ) + Chr( 13 ) ENDIF FWrite( ::hFile, cBlock, Len( cBlock ) ) @@ -289,11 +290,11 @@ FUNCTION Write( xTxt ) LOCAL self := QSelf() - return ::WriteLn( xTxt, .F. ) + RETURN ::WriteLn( xTxt, .F. ) - // - // Go to a specified line number - // +// +// Go to a specified line number +// STATIC FUNCTION GOTO( nLine ) @@ -302,7 +303,7 @@ STATIC FUNCTION GOTO( nLine ) IF Empty( ::hFile ) QOut( "DosFile:Goto : No file open" ) - elseif ::cMode != "R" + ELSEIF !( ::cMode == "R" ) QOut( "File ", ::cFileName, " not open for reading" ) ELSE ::lEoF := .F. // Clear (old) End of file @@ -310,7 +311,7 @@ STATIC FUNCTION GOTO( nLine ) ::cBlock := "" FSeek( ::hFile, 0 ) // Go top DO WHILE !::lEoF .AND. nWhere < nLine - nWhere ++ + nWhere++ ::Read() ENDDO ENDIF diff --git a/harbour/tests/inifiles.prg b/harbour/tests/inifiles.prg index 3c6898fba6..810483445f 100644 --- a/harbour/tests/inifiles.prg +++ b/harbour/tests/inifiles.prg @@ -101,9 +101,8 @@ STATIC FUNCTION New( cFileName ) cLine := SubStr( cLine, 2 ) ENDIF - AAdd( ::Contents, { cLine, { /* this will be CurrArray */ - } } ) - CurrArray := ::Contents[Len(::Contents)][ 2 ] + AAdd( ::Contents, { cLine, { /* this will be CurrArray */ } } ) + CurrArray := ::Contents[ Len( ::Contents ) ][ 2 ] ELSEIF Left( cLine, 1 ) == ";" // preserve comments AAdd( CurrArray, { NIL, cLine } ) @@ -145,7 +144,7 @@ STATIC FUNCTION ReadString( cSection, cIdent, cDefault ) j := AScan( ::Contents, {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind .AND. ValType( x[ 2 ] ) == "C" } ) IF j > 0 - cResult := ::Contents[j][ 2 ] + cResult := ::Contents[ j ][ 2 ] ENDIF ELSE @@ -157,7 +156,7 @@ STATIC FUNCTION ReadString( cSection, cIdent, cDefault ) j := AScan( ::Contents[ i ][ 2 ], {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind } ) IF j > 0 - cResult := ::Contents[ i ][ 2 ][j][ 2 ] + cResult := ::Contents[ i ][ 2 ][ j ][ 2 ] ENDIF ENDIF ENDIF @@ -177,7 +176,7 @@ STATIC PROCEDURE WriteString( cSection, cIdent, cString ) j := AScan( ::Contents, {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind .AND. ValType( x[ 2 ] ) == "C" } ) IF j > 0 - ::Contents[j][ 2 ] := cString + ::Contents[ j ][ 2 ] := cString ELSE AAdd( ::Contents, NIL ) @@ -187,19 +186,19 @@ STATIC PROCEDURE WriteString( cSection, cIdent, cString ) ELSE cFind := Lower( cSection ) - IF ( i := AScan( ::Contents, {| x | ValType(x[ 1 ] ) == "C" .AND. Lower(x[ 1 ] ) == cFind .AND. ValType(x[ 2 ] ) == "A" } ) ) > 0 + IF ( i := AScan( ::Contents, {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind .AND. ValType( x[ 2 ] ) == "A" } ) ) > 0 cFind := Lower( cIdent ) j := AScan( ::Contents[ i ][ 2 ], {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cFind } ) IF j > 0 - ::Contents[ i ][ 2 ][j][ 2 ] := cString + ::Contents[ i ][ 2 ][ j ][ 2 ] := cString ELSE AAdd( ::Contents[ i ][ 2 ], { cIdent, cString } ) ENDIF ELSE - AAdd( ::Contents, { cSection, { {cIdent, cString} } } ) + AAdd( ::Contents, { cSection, { { cIdent, cString } } } ) ENDIF ENDIF @@ -272,14 +271,14 @@ STATIC PROCEDURE EraseSection( cSection ) LOCAL i IF Empty( cSection ) - DO WHILE ( i := AScan( ::Contents, {| x | ValType(x[ 1 ] ) == "C" .AND. ValType(x[ 2 ] ) == "C" } ) ) > 0 + DO WHILE ( i := AScan( ::Contents, {| x | ValType( x[ 1 ] ) == "C" .AND. ValType( x[ 2 ] ) == "C" } ) ) > 0 ADel( ::Contents, i ) ASize( ::Contents, Len( ::Contents ) - 1 ) ENDDO ELSE cSection := Lower( cSection ) - IF ( i := AScan( ::Contents, {| x | ValType(x[ 1 ] ) == "C" .AND. Lower(x[ 1 ] ) == cSection .AND. ValType(x[ 2 ] ) == "A" } ) ) > 0 + IF ( i := AScan( ::Contents, {| x | ValType( x[ 1 ] ) == "C" .AND. Lower( x[ 1 ] ) == cSection .AND. ValType( x[ 2 ] ) == "A" } ) ) > 0 ADel( ::Contents, i ) ASize( ::Contents, Len( ::Contents ) - 1 ) ENDIF @@ -301,12 +300,12 @@ STATIC FUNCTION ReadSection( cSection ) ELSE cSection := Lower( cSection ) - IF ( i := AScan( ::Contents, {| x | ValType(x[ 1 ] ) == "C" .AND. x[ 1 ] == cSection .AND. ValType(x[ 2 ] ) == "A" } ) ) > 0 + IF ( i := AScan( ::Contents, {| x | ValType(x[ 1 ] ) == "C" .AND. x[ 1 ] == cSection .AND. ValType( x[ 2 ] ) == "A" } ) ) > 0 FOR j := 1 TO Len( ::Contents[ i ][ 2 ] ) - IF ::Contents[ i ][ 2 ][j][ 1 ] != NIL - AAdd( aSection, ::Contents[ i ][ 2 ][j][ 1 ] ) + IF ::Contents[ i ][ 2 ][ j ][ 1 ] != NIL + AAdd( aSection, ::Contents[ i ][ 2 ][ j ][ 1 ] ) ENDIF NEXT ENDIF @@ -343,12 +342,12 @@ STATIC PROCEDURE UpdateFile() FWrite( hFile, "[" + ::Contents[ i ][ 1 ] + "]" + Chr( 13 ) + Chr( 10 ) ) FOR j := 1 TO Len( ::Contents[ i ][ 2 ] ) - if ::Contents[ i ][ 2 ][j][ 1 ] == NIL - FWrite( hFile, ::Contents[ i ][ 2 ][j][ 2 ] + Chr( 13 ) + Chr( 10 ) ) + IF ::Contents[ i ][ 2 ][ j ][ 1 ] == NIL + FWrite( hFile, ::Contents[ i ][ 2 ][ j ][ 2 ] + Chr( 13 ) + Chr( 10 ) ) ELSE - FWrite( hFile, ::Contents[ i ][ 2 ][j][ 1 ] + "=" + ::Contents[ i ][ 2 ][j][ 2 ] + Chr( 13 ) + Chr( 10 ) ) + FWrite( hFile, ::Contents[ i ][ 2 ][ j ][ 1 ] + "=" + ::Contents[ i ][ 2 ][ j ][ 2 ] + Chr( 13 ) + Chr( 10 ) ) ENDIF - next + NEXT FWrite( hFile, Chr( 13 ) + Chr( 10 ) ) ELSEIF ValType( ::Contents[ i ][ 2 ] ) == "C" diff --git a/harbour/tests/initexit.prg b/harbour/tests/initexit.prg index 0d1d360301..c6db3cc89d 100644 --- a/harbour/tests/initexit.prg +++ b/harbour/tests/initexit.prg @@ -28,7 +28,7 @@ INIT FUNCTION SecondOne() static_var_accessed_in_INIT_function ++ QOut( "global static=", static_var_accessed_in_INIT_function ) - RETURN nil + RETURN NIL INIT FUNCTION Third() STATIC static_var := "THIRD()" @@ -37,7 +37,7 @@ INIT FUNCTION Third() static_var_accessed_in_INIT_function ++ QOut( "global static=", static_var_accessed_in_INIT_function ) - RETURN nil + RETURN NIL EXIT FUNCTION Fifth() STATIC static_var := "FIFTH()" @@ -46,7 +46,7 @@ EXIT FUNCTION Fifth() static_var_accessed_in_INIT_function -- QOut( "global static=", static_var_accessed_in_INIT_function ) - RETURN nil + RETURN NIL EXIT FUNCTION Sixth() STATIC static_var := "SIXTH()" @@ -55,7 +55,7 @@ EXIT FUNCTION Sixth() static_var_accessed_in_INIT_function -- QOut( "global static=", static_var_accessed_in_INIT_function ) - RETURN nil + RETURN NIL INIT PROCEDURE _INITSTATICS() PUBLIC _initStatics := "_INITSTATICS" diff --git a/harbour/tests/inkeytst.prg b/harbour/tests/inkeytst.prg index 583b27b9a7..2a12e49e3a 100644 --- a/harbour/tests/inkeytst.prg +++ b/harbour/tests/inkeytst.prg @@ -200,7 +200,7 @@ PROCEDURE TEST6 PROCEDURE TEST7( cSkip, cRaw ) - LOCAL nKey, nMask, cText + LOCAL nKey, nMask CLS ? "For the last test, a loop is started and all keyboard and mouse" diff --git a/harbour/tests/inline.prg b/harbour/tests/inline.prg index c586520c7b..3a15902b56 100644 --- a/harbour/tests/inline.prg +++ b/harbour/tests/inline.prg @@ -21,7 +21,7 @@ FUNCTION TForm() STATIC oClass - IF oClass == nil + IF oClass == NIL oClass := HBClass():New( "TFORM" ) // starts a new class definition oClass:AddData( "cText" ) // define this class objects datas diff --git a/harbour/tests/iotest.prg b/harbour/tests/iotest.prg index afd495881e..9a56c7c8b4 100644 --- a/harbour/tests/iotest.prg +++ b/harbour/tests/iotest.prg @@ -6,7 +6,7 @@ PROCEDURE Main() - LOCAL h := 0 + LOCAL h LOCAL cstr := " " LOCAL ntmp := 1 diff --git a/harbour/tests/iotest2.prg b/harbour/tests/iotest2.prg index ab09617b00..26df94e163 100644 --- a/harbour/tests/iotest2.prg +++ b/harbour/tests/iotest2.prg @@ -7,9 +7,8 @@ PROCEDURE Main() - LOCAL h := 0 + LOCAL h LOCAL cstr := " " - LOCAL ntmp := 0 h := FCreate( "test.txt" ) QOut( "create handle", h ) diff --git a/harbour/tests/longdev.prg b/harbour/tests/longdev.prg index d42560b6c3..92a6a4da5f 100644 --- a/harbour/tests/longdev.prg +++ b/harbour/tests/longdev.prg @@ -11,7 +11,7 @@ PROCEDURE Main() LOCAL cShort := "1234567890" - LOCAL i, j, cLong, cBuffer, nHandle + LOCAL i, cLong, cBuffer, nHandle // Create an 80 KB string (Clipper is limited to 64 KB). cLong := cShort diff --git a/harbour/tests/longstr2.prg b/harbour/tests/longstr2.prg index 19636afca7..1423bb2d17 100644 --- a/harbour/tests/longstr2.prg +++ b/harbour/tests/longstr2.prg @@ -6,7 +6,7 @@ PROCEDURE Main() LOCAL short := "1234567890" - LOCAL i, long, very_long, cNewLine + LOCAL i, long, very_long long := short FOR i := 1 TO 12 diff --git a/harbour/tests/memvar.prg b/harbour/tests/memvar.prg index bf2b185967..fccbe1b24a 100644 --- a/harbour/tests/memvar.prg +++ b/harbour/tests/memvar.prg @@ -33,6 +33,8 @@ PROCEDURE Main() LOCAL main := 0 + HB_SYMBOL_UNUSED( main ) + Test1() __Accept( "press Enter..." ) Test2() diff --git a/harbour/tests/multiarg.prg b/harbour/tests/multiarg.prg index 49da1baa4d..8907d1b757 100644 --- a/harbour/tests/multiarg.prg +++ b/harbour/tests/multiarg.prg @@ -22,6 +22,17 @@ PROCEDURE Main() FUNCTION ShoutArg( nArg, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 ) + HB_SYMBOL_UNUSED( x1 ) + HB_SYMBOL_UNUSED( x2 ) + HB_SYMBOL_UNUSED( x3 ) + HB_SYMBOL_UNUSED( x4 ) + HB_SYMBOL_UNUSED( x5 ) + HB_SYMBOL_UNUSED( x6 ) + HB_SYMBOL_UNUSED( x7 ) + HB_SYMBOL_UNUSED( x8 ) + HB_SYMBOL_UNUSED( x9 ) + HB_SYMBOL_UNUSED( x10 ) + QOut( nArg, "==", hb_PValue( nArg ) ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/newrdd.prg b/harbour/tests/newrdd.prg index cb8ddd0b0a..0f85b67ce0 100644 --- a/harbour/tests/newrdd.prg +++ b/harbour/tests/newrdd.prg @@ -315,7 +315,7 @@ PROCEDURE Main() CLS nI := 1 - NEWRDD->( __dbPack( {|| QOut( nI ), nI ++ } ) ) + NEWRDD->( __dbPack( {|| QOut( nI ), nI++ } ) ) ? "RecCount:", NEWRDD->( RecCount() ) ? "Press any key to continue..." diff --git a/harbour/tests/nums.prg b/harbour/tests/nums.prg index eea1ee52bd..e278220cd6 100644 --- a/harbour/tests/nums.prg +++ b/harbour/tests/nums.prg @@ -18,5 +18,6 @@ PROCEDURE Main() QOut( c ) QOut( d ) QOut( e ) + QOut( f ) RETURN diff --git a/harbour/tests/objasign.prg b/harbour/tests/objasign.prg index 500cb183b1..aa759658b2 100644 --- a/harbour/tests/objasign.prg +++ b/harbour/tests/objasign.prg @@ -23,9 +23,9 @@ PROCEDURE Main() o:x := 4 QOut( "Assign 4 : ", o:x ) - QOut( "Post increment : ", o:x ++ ) + QOut( "Post increment : ", o:x++ ) QOut( "After : ", o:x ) - QOut( "Pre decrement : ", -- o:x ) + QOut( "Pre decrement : ", --o:x ) QOut( "After : ", o:x ) o:x += 2 diff --git a/harbour/tests/objects.prg b/harbour/tests/objects.prg index 3c284be203..4b39500b60 100644 --- a/harbour/tests/objects.prg +++ b/harbour/tests/objects.prg @@ -30,7 +30,7 @@ FUNCTION TAny() /* builds a class */ STATIC hClass - IF hClass == nil + IF hClass == NIL hClass := __clsNew( "TANY", 3 ) // cClassName, nDatas __clsAddMsg( hClass, "cName", 1, HB_OO_MSG_DATA ) // retrieve data __clsAddMsg( hClass, "_cName", 1, HB_OO_MSG_DATA ) // assign data. Note the '_' @@ -62,4 +62,4 @@ STATIC FUNCTION Test() QOut( ::ClassName() ) // :: means Self: It is a Harbour built-in operator - RETURN nil + RETURN NIL diff --git a/harbour/tests/overload.prg b/harbour/tests/overload.prg index 43840ba18c..f30f274fa5 100644 --- a/harbour/tests/overload.prg +++ b/harbour/tests/overload.prg @@ -39,7 +39,7 @@ PROCEDURE Main() QOut( "Array index[3] := 'X' :", oString[ 3 ] := 'X' ) QOut( oString:cValue ) - RETURN nil + RETURN CREATE CLASS tString @@ -69,7 +69,7 @@ FUNCTION TString() STATIC oClass - IF oClass == nil + IF oClass == NIL oClass = HBClass():New( "TSTRING" ) // starts a new class definition oClass:AddData( "cValue" ) // define this class objects datas diff --git a/harbour/tests/passref.prg b/harbour/tests/passref.prg index eff3d7fb6c..a993e3dcd3 100644 --- a/harbour/tests/passref.prg +++ b/harbour/tests/passref.prg @@ -25,4 +25,4 @@ FUNCTION testfun( b, c ) QOut( 'a pointer+10 =', b ) QOut( 'b pointer := "A" =', c ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/procname.prg b/harbour/tests/procname.prg index 66c1f4bf39..ce9724ad8b 100644 --- a/harbour/tests/procname.prg +++ b/harbour/tests/procname.prg @@ -14,19 +14,19 @@ FUNCTION Two() Three() - RETURN nil + RETURN NIL FUNCTION Three() Four() - RETURN nil + RETURN NIL FUNCTION Four() Five() - RETURN nil + RETURN NIL FUNCTION Five() @@ -36,4 +36,4 @@ FUNCTION Five() QQOut( "Called from: ", ProcName( n ), ProcLine( n++ ), hb_eol() ) ENDDO - RETURN nil + RETURN NIL diff --git a/harbour/tests/readhrb.prg b/harbour/tests/readhrb.prg index 960d0c97ac..32597eb16b 100644 --- a/harbour/tests/readhrb.prg +++ b/harbour/tests/readhrb.prg @@ -50,12 +50,11 @@ STATIC s_aScopes := { ; PROCEDURE Main( cFrom ) LOCAL hFile - LOCAL cBlock := " " + LOCAL cBlock LOCAL n, m LOCAL nVal LOCAL nSymbols LOCAL nFuncs - LOCAL cMode := "SYMBOL" LOCAL cScope LOCAL nLenCount LOCAL nIdx diff --git a/harbour/tests/returns.prg b/harbour/tests/returns.prg index 82119820a3..1fdb4e5f6a 100644 --- a/harbour/tests/returns.prg +++ b/harbour/tests/returns.prg @@ -23,13 +23,13 @@ FUNCTION Two( n ) DO CASE CASE n == 1 QOut( "n == 1" ) - RETURN nil + RETURN NIL CASE n == 2 QOut( "n == 2" ) - RETURN nil + RETURN NIL ENDCASE QOut( "This message should not been seen" ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/rto_get.prg b/harbour/tests/rto_get.prg index 97cbca7451..bdc30e4d7a 100644 --- a/harbour/tests/rto_get.prg +++ b/harbour/tests/rto_get.prg @@ -1585,19 +1585,6 @@ PROCEDURE LogGETVars( o, desc, xResult ) RETURN -STATIC FUNCTION ObjToList( o ) - LOCAL cString := "" - LOCAL tmp - - FOR tmp := 1 TO Len( o ) - cString += XToStr( o[ tmp ] ) - IF tmp < Len( o ) - cString += ", " - ENDIF - NEXT - - RETURN cString - FUNCTION XToStr( xValue ) LOCAL cType := ValType( xValue ) diff --git a/harbour/tests/rto_tb.prg b/harbour/tests/rto_tb.prg index 9fa803be64..906a81ab06 100644 --- a/harbour/tests/rto_tb.prg +++ b/harbour/tests/rto_tb.prg @@ -584,19 +584,6 @@ PROCEDURE LogTBCVars( o, desc, xResult ) RETURN -STATIC FUNCTION ObjToList( o ) - LOCAL cString := "" - LOCAL tmp - - FOR tmp := 1 TO Len( o ) - cString += XToStr( o[ tmp ] ) - IF tmp < Len( o ) - cString += ", " - ENDIF - NEXT - - RETURN cString - FUNCTION XToStr( xValue ) LOCAL cType := ValType( xValue ) diff --git a/harbour/tests/sbartest.prg b/harbour/tests/sbartest.prg index ab0ca1d0c6..b5550c5394 100644 --- a/harbour/tests/sbartest.prg +++ b/harbour/tests/sbartest.prg @@ -27,7 +27,7 @@ PROCEDURE Main() FUNCTION InitScrlBar() - LOCAL tmpFileList := {}, i + LOCAL tmpFileList, i MEMVAR aFileList, filesScroll PRIVATE aFileList := {}, filesScroll diff --git a/harbour/tests/setkeys.prg b/harbour/tests/setkeys.prg index 4ffe1a31e9..e0cd2307af 100644 --- a/harbour/tests/setkeys.prg +++ b/harbour/tests/setkeys.prg @@ -58,7 +58,7 @@ PROCEDURE Main() LOCAL GetList := {} - LOCAL alpha, bravo, charlie, k, l + LOCAL alpha, bravo, charlie, k LOCAL F8Active := .T. CLS diff --git a/harbour/tests/speed.prg b/harbour/tests/speed.prg index bc0828933e..cff5196583 100644 --- a/harbour/tests/speed.prg +++ b/harbour/tests/speed.prg @@ -7,7 +7,7 @@ PROCEDURE Main() LOCAL Program := { , }, Condition := 1, body := 2, Counter := 1, TheEnd := 1000000, stop, start Program[ condition ] := {|| Counter == TheEnd } - Program[ body ] := {|| Counter ++ } + Program[ body ] := {|| Counter++ } ? start := Second() // in Clipper : diff --git a/harbour/tests/statfun.prg b/harbour/tests/statfun.prg index 67727fe664..a839792d2f 100644 --- a/harbour/tests/statfun.prg +++ b/harbour/tests/statfun.prg @@ -18,4 +18,4 @@ STATIC FUNCTION SecondOne() QOut( "From Second()" ) - RETURN nil + RETURN NIL diff --git a/harbour/tests/statics.prg b/harbour/tests/statics.prg index 569f382271..3ae55f9d3a 100644 --- a/harbour/tests/statics.prg +++ b/harbour/tests/statics.prg @@ -53,6 +53,8 @@ PROCEDURE NumStat( a ) // STATIC m := s_n // uncomment it to see an error // STATIC m := Time() // uncomment it to see an error + HB_SYMBOL_UNUSED( a ) + cb := {| x | s_z + Str( x ) } QOut( ++s_n ) QOut( Eval( cb, s_n ) ) diff --git a/harbour/tests/stripem.prg b/harbour/tests/stripem.prg index dff99d0bca..cd0efdde45 100644 --- a/harbour/tests/stripem.prg +++ b/harbour/tests/stripem.prg @@ -108,16 +108,16 @@ FUNCTION New( cFileName, cMode, nBlock ) ::cFileName := cFileName ::cMode := Default( cMode, "R" ) - if ::cMode == "R" + IF ::cMode == "R" ::hFile := FOpen( cFileName ) - elseif ::cMode == "W" + ELSEIF ::cMode == "W" ::hFile := FCreate( cFileName ) ELSE QOut( "DosFile Init: Unknown file mode:", ::cMode ) ENDIF ::nError := FError() - if ::nError != 0 + IF ::nError != 0 ::lEoF := .T. QOut( "Error ", ::nError ) ENDIF @@ -134,8 +134,8 @@ FUNCTION Dispose() LOCAL self := QSelf() ::cBlock := NIL - if ::hFile != - 1 - if ::cMode == "W" .AND. ::nError != 0 + IF ::hFile != - 1 + IF ::cMode == "W" .AND. ::nError != 0 ::Write( Chr( 26 ) ) // Do not forget EOF marker ENDIF IF !FClose( ::hFile ) @@ -157,11 +157,10 @@ FUNCTION READ() LOCAL cBlock LOCAL nCrPos LOCAL nEoFPos - LOCAL nRead - if ::hFile == - 1 + IF ::hFile == - 1 QOut( "DosFile:Read : No file open" ) - elseif ::cMode != "R" + ELSEIF ::cMode != "R" QOut( "File ", ::cFileName, " not open for reading" ) ELSEIF !::lEoF @@ -213,9 +212,9 @@ FUNCTION WriteLn( xTxt, lCRLF ) LOCAL self := QSelf() LOCAL cBlock - if ::hFile == - 1 + IF ::hFile == - 1 QOut( "DosFile:Write : No file open" ) - elseif ::cMode != "W" + ELSEIF !( ::cMode == "W" ) QOut( "File ", ::cFileName, " not opened for writing" ) ELSE cBlock := ToChar( xTxt ) // Convert to string @@ -242,7 +241,7 @@ FUNCTION GOTO( nLine ) IF Empty( ::hFile ) QOut( "DosFile:Goto : No file open" ) - elseif ::cMode != "R" + ELSEIF !( ::cMode == "R" ) QOut( "File ", ::cFileName, " not open for reading" ) ELSE ::lEoF := .F. // Clear (old) End of file diff --git a/harbour/tests/switch.prg b/harbour/tests/switch.prg index 65ad870a98..97b3f2e07e 100644 --- a/harbour/tests/switch.prg +++ b/harbour/tests/switch.prg @@ -9,6 +9,7 @@ PROCEDURE Main() LOCAL a := 1 + MEMVAR b PRIVATE b := "b" #ifndef __XHARBOUR__ diff --git a/harbour/tests/tb1.prg b/harbour/tests/tb1.prg index 28791fcccd..cb5f62aae7 100644 --- a/harbour/tests/tb1.prg +++ b/harbour/tests/tb1.prg @@ -70,7 +70,7 @@ PROCEDURE Main() oCol1:footing := "position" oCol1:colorBlock := {| val | { val % 5 + 1, val % 3 + 2 } } - oCol2 := TBColumnNew( "COL;2", {|| s_nCount ++ } ) + oCol2 := TBColumnNew( "COL;2", {|| s_nCount++ } ) oCol2:defColor := { 3, 4, 5, 6 } oCol2:footing := "counter" oCol2:headSep := hb_UTF8ToStr( "┐ ┌─┤HIDE├─" ) diff --git a/harbour/tests/test_all.prg b/harbour/tests/test_all.prg index d90f7663f9..da3f70844d 100644 --- a/harbour/tests/test_all.prg +++ b/harbour/tests/test_all.prg @@ -17,7 +17,7 @@ PROCEDURE Main( cOption, cCmd ) - LOCAL aDir, f, n, o, p, cRead + LOCAL aDir, f, n, o, p SET DATE ANSI SET CENTURY ON diff --git a/harbour/tests/testbrw.prg b/harbour/tests/testbrw.prg index 3d5a125389..18494520a8 100644 --- a/harbour/tests/testbrw.prg +++ b/harbour/tests/testbrw.prg @@ -16,12 +16,14 @@ PROCEDURE Main() LOCAL aTest2 := { Date(), Date() + 4, Date() + 56, Date() + 14, Date() + 5, Date() + 6, Date() + 7, Date() + 8, Date() + 10000, Date() - 1000, Date() - 54, Date() + 456342 } LOCAL aTest3 := { .T. , .F. , .T. , .T. , .F. , .F. , .T. , .F. , .T. , .T. , .F. , .F. } LOCAL n := 1 - LOCAL nKey - LOCAL lEnd := .F. LOCAL nCursor LOCAL cColor LOCAL nRow, nCol +#ifndef HB_COMPAT_C53 + LOCAL nKey LOCAL nTmpRow, nTmpCol + LOCAL lEnd := .F. +#endif oBrowse:colorSpec := "W+/B, N/BG" oBrowse:ColSep := hb_UTF8ToStr( "│" ) @@ -60,10 +62,10 @@ PROCEDURE Main() nCol := Col() @ 4, 4, 17, 31 BOX hb_UTF8ToStr( "┌─┐│┘─└│ " ) #ifdef HB_COMPAT_C53 - oBrowse:SetKey( 0, {| ob, nkey | Defproc( ob,nKey ) } ) + oBrowse:SetKey( 0, {| ob, nkey | Defproc( ob, nKey ) } ) WHILE .T. oBrowse:ForceStable() - IF ( oBrowse:applykey( Inkey(0 ) ) == - 1 ) + IF oBrowse:applykey( Inkey( 0 ) ) == -1 EXIT ENDIF ENDDO diff --git a/harbour/tests/testcls.prg b/harbour/tests/testcls.prg index 474b798438..ab85f7b6db 100644 --- a/harbour/tests/testcls.prg +++ b/harbour/tests/testcls.prg @@ -32,4 +32,4 @@ METHOD MyErrorManager( uParam1 ) CLASS Test Alert( __GetMessage() ) // Shows the message that was sent to the object - RETURN nil + RETURN NIL diff --git a/harbour/tests/testerro.prg b/harbour/tests/testerro.prg index f6f2706f84..5f1570c971 100644 --- a/harbour/tests/testerro.prg +++ b/harbour/tests/testerro.prg @@ -12,4 +12,6 @@ PROCEDURE Main() n++ // an error should raise here + HB_SYMBOL_UNUSED( n ) + RETURN diff --git a/harbour/tests/testfor.prg b/harbour/tests/testfor.prg index d275e767de..5f5508de9d 100644 --- a/harbour/tests/testfor.prg +++ b/harbour/tests/testfor.prg @@ -2,7 +2,7 @@ * $Id$ */ -PRCOEDURE Main() +PROCEDURE Main() LOCAL i diff --git a/harbour/tests/testmem.prg b/harbour/tests/testmem.prg index d840256e6b..d6b047695b 100644 --- a/harbour/tests/testmem.prg +++ b/harbour/tests/testmem.prg @@ -11,4 +11,7 @@ PROCEDURE Main() a := "Hello" b := 2 + HB_SYMBOL_UNUSED( a ) + HB_SYMBOL_UNUSED( b ) + RETURN diff --git a/harbour/tests/testntx.prg b/harbour/tests/testntx.prg index f95d21e32b..eccd494391 100644 --- a/harbour/tests/testntx.prg +++ b/harbour/tests/testntx.prg @@ -4,7 +4,7 @@ PROCEDURE Main() - LOCAL i := 0, block + LOCAL i := 0 FIELD Last, First USE test diff --git a/harbour/tests/testop.prg b/harbour/tests/testop.prg index 730024a207..86875da065 100644 --- a/harbour/tests/testop.prg +++ b/harbour/tests/testop.prg @@ -62,10 +62,12 @@ PROCEDURE Main() LOCAL oCar := TCar():New( "red", 2 ) - LOCAL oPetrol + LOCAL oPetrol := NIL oCar := oCar + oPetrol + HB_SYMBOL_UNUSED( oCar ) + RETURN //----------------------------------------------------------------------------// @@ -102,6 +104,8 @@ METHOD New( cColor, nDoors ) CLASS TCar METHOD SUM( oObject ) CLASS TCar + HB_SYMBOL_UNUSED( oObject ) + Alert( "+ has a special meaning and " + ; "functionality for TCar Class objects!!!" ) diff --git a/harbour/tests/testpp.prg b/harbour/tests/testpp.prg index 1ddf6e74fd..595a8ea01b 100644 --- a/harbour/tests/testpp.prg +++ b/harbour/tests/testpp.prg @@ -5,8 +5,9 @@ // Tests for stringify match markers // Preproces and compile only PROC MAIN() -LOCAL b +LOCAL b := "" MEMVAR a +MEMVAR c PRIVATE a #command _REGULAR_() => ? //REGULAR diff --git a/harbour/tests/testrdd2.prg b/harbour/tests/testrdd2.prg index b57e653fa6..37ffd6cf48 100644 --- a/harbour/tests/testrdd2.prg +++ b/harbour/tests/testrdd2.prg @@ -4,11 +4,11 @@ #include "ord.ch" -#define MAX_TEST_RECS 100 -#define INDEX_KEY_CHAR CHAR + Str( NUM ) + DTOS( DATE ) -#define INDEX_KEY_NUM NUM -#define INDEX_KEY_DATE DATE -#define INDEX_KEY_LOG LOG +#define MAX_TEST_RECS 100 +#define INDEX_KEY_CHAR CHAR + Str( NUM ) + DToS( DATE ) +#define INDEX_KEY_NUM NUM +#define INDEX_KEY_DATE DATE +#define INDEX_KEY_LOG LOG EXTERNAL _ADS EXTERNAL DBFNTX @@ -351,7 +351,7 @@ PROCEDURE ErrorSys() STATIC PROCEDURE MyError( e ) - LOCAL cTrace := "", i := 1 /* Start are "real" error */, cErr + LOCAL i := 1 /* Start are "real" error */, cErr cErr := "Runtime error" + hb_eol() + ; hb_eol() + ; @@ -362,7 +362,7 @@ STATIC PROCEDURE MyError( e ) "Call trace:" + hb_eol() + ; hb_eol() - DO WHILE ! Empty( ProcName( ++ i ) ) + DO WHILE ! Empty( ProcName( ++i ) ) cErr += RTrim( ProcName( i ) ) + "(" + LTrim( Str( ProcLine( i ) ) ) + ")" + hb_eol() ENDDO @@ -394,6 +394,8 @@ STATIC FUNCTION CompareArray( a1, a2 ) STATIC PROCEDURE NotifyUser( cErr, lNotError ) + HB_SYMBOL_UNUSED( lNotError ) + ? cErr QUIT // If remove this, will display all error without stopping diff --git a/harbour/tests/teststr.prg b/harbour/tests/teststr.prg index 8e061bb678..e65268ad26 100644 --- a/harbour/tests/teststr.prg +++ b/harbour/tests/teststr.prg @@ -2,7 +2,7 @@ * $Id$ */ -PROCEDURE Main( cParam ) +PROCEDURE Main() OutStd( hb_eol() ) OutStd( "Running with SET FIXED OFF (the default setting): " ) diff --git a/harbour/tests/testvars.prg b/harbour/tests/testvars.prg index 7bf7d0e5dd..d36c9e43c0 100644 --- a/harbour/tests/testvars.prg +++ b/harbour/tests/testvars.prg @@ -15,6 +15,10 @@ PROCEDURE Main( Param1 ) QOut( j ) + HB_SYMBOL_UNUSED( Param1 ) + HB_SYMBOL_UNUSED( k ) + HB_SYMBOL_UNUSED( i ) + RETURN FUNCTION Sub( j ) diff --git a/harbour/tests/testwarn.prg b/harbour/tests/testwarn.prg index ca33fe2c32..c2131473d6 100644 --- a/harbour/tests/testwarn.prg +++ b/harbour/tests/testwarn.prg @@ -57,52 +57,52 @@ STATIC lGlobal AS LOGICAL PROCEDURE Main( optional ) - STATIC lStatic := 0, oMyObj As Class WrongClass + STATIC lStatic := 0, oMyObj As Class WrongClass - LOCAL cVar AS STRING := [declare function] + LOCAL cVar AS STRING := [declare function] - LOCAL a As STRING, oB AS Class MyClass, c AS STRING, oD AS Class OtherClass + LOCAL a As STRING, oB AS Class MyClass, c AS STRING, oD AS Class OtherClass - FIELD b AS NUMERIC + FIELD b AS NUMERIC - MEMVAR Var1 AS NUMERIC + MEMVAR Var1 AS NUMERIC - PRIVATE TEST AS STRING + PRIVATE TEST AS STRING - USE TEMP + USE TEMP - oMyObj:MyMethod( 2, 3, 4 ) + oMyObj:MyMethod( 2, 3, 4 ) - a := b:nMyFunc(2,3) - a := b:nMyFunc(2) + a := b:nMyFunc(2,3) + a := b:nMyFunc(2) - a := oB:oNext( 1 ):cMyData - a := oB:oNext( c ):cMyData2 - a := oB:oNext( d ):cMyData - a := oB:oNext( oD ):cMyData + a := oB:oNext( 1 ):cMyData + a := oB:oNext( c ):cMyData2 + a := oB:oNext( d ):cMyData + a := oB:oNext( oD ):cMyData - a := oB:aInstances[1]:oNext:cMyData2 - a := oB:aInstances[1]:oNext:cMyData + a := oB:aInstances[1]:oNext:cMyData2 + a := oB:aInstances[1]:oNext:cMyData - x := cOtherFunc( "A" ) - x := cOtherFunc( @Test ) - x := cOtherFunc( "A", "A", "A" ) + x := cOtherFunc( "A" ) + x := cOtherFunc( @Test ) + x := cOtherFunc( "A", "A", "A" ) - M->TEST := "TEST" + M->TEST := "TEST" - a := "A" + a := "A" - oB := "a" + oB := "a" - if lStatic - Var1 := .F. - endif + IF lStatic + Var1 := .F. + ENDIF - IF lGlobal - Var1 := .T. - ENDIF + IF lGlobal + Var1 := .T. + ENDIF -RETURN + RETURN PROCEDURE SOMEPROC() diff --git a/harbour/tests/tstasort.prg b/harbour/tests/tstasort.prg index 791ce671c2..754bfdf7f9 100644 --- a/harbour/tests/tstasort.prg +++ b/harbour/tests/tstasort.prg @@ -9,21 +9,20 @@ PROCEDURE Main() LOCAL a := { 3, 2, 1 } LOCAL b := { 10 } LOCAL c := { 2, .T. , "B", NIL, { 1 }, {|| b }, oError, Date(), 1, .F. , "A", NIL, Date() - 1, { 0 }, {|| a }, oError } - LOCAL t ? ? - ? "Original.....:", aDump( t := a ) - ? "Asort.c......:", aDump( ASort( t := AClone( a ) ) ) - ? "Asort.c.block:", aDump( ASort( t := AClone( a ), , , {| x, y | x < y } ) ) + ? "Original.....:", aDump( a ) + ? "Asort.c......:", aDump( ASort( AClone( a ) ) ) + ? "Asort.c.block:", aDump( ASort( AClone( a ), , , {| x, y | x < y } ) ) ? - ? "Original.....:", aDump( t := b ) - ? "Asort.c......:", aDump( ASort( t := AClone( b ) ) ) - ? "Asort.c.block:", aDump( ASort( t := AClone( b ), , , {| x, y | x < y } ) ) + ? "Original.....:", aDump( b ) + ? "Asort.c......:", aDump( ASort( AClone( b ) ) ) + ? "Asort.c.block:", aDump( ASort( AClone( b ), , , {| x, y | x < y } ) ) ? - ? "Original.....:", aDump( t := c ) - ? "Asort.c......:", aDump( ASort( t := AClone( c ) ) ) - ? "Asort.c.block:", aDump( ASort( t := AClone( c ), , , {| x, y | xToStr( x ) < xToStr( y ) } ) ) + ? "Original.....:", aDump( c ) + ? "Asort.c......:", aDump( ASort( AClone( c ) ) ) + ? "Asort.c.block:", aDump( ASort( AClone( c ), , , {| x, y | xToStr( x ) < xToStr( y ) } ) ) RETURN diff --git a/harbour/tests/tstdbi.prg b/harbour/tests/tstdbi.prg index 604ac32906..4e41ebe33e 100644 --- a/harbour/tests/tstdbi.prg +++ b/harbour/tests/tstdbi.prg @@ -60,6 +60,6 @@ STATIC FUNCTION xToStr( xValue ) RETURN "A" + hb_ntos( Len( xValue ) ) CASE "U" RETURN "NIL" - ENDCASE + ENDSWITCH RETURN "" diff --git a/harbour/tests/tstmacro.prg b/harbour/tests/tstmacro.prg index 4078f9b5c1..b73a0ef2ab 100644 --- a/harbour/tests/tstmacro.prg +++ b/harbour/tests/tstmacro.prg @@ -13,6 +13,10 @@ PROCEDURE Main() PRIVATE cVar_1, cMainPrivate := "cVar_1", GlobalPrivate := "BornInRunTimeVar" + // to avoid unused STATIC FUNCTION warnings + UDF_STATIC() + UDF2_STATIC() + &cStr_1 := "Simple " ? M->cVar_1 diff --git a/harbour/tests/varparam.prg b/harbour/tests/varparam.prg index 581fc9d2ae..28344a1bd6 100644 --- a/harbour/tests/varparam.prg +++ b/harbour/tests/varparam.prg @@ -6,7 +6,7 @@ MEMVAR iLoop -PROCEDURE Main( p1, p2 ) +PROCEDURE Main() LOCAL l1 := 11, l2 := 22, l3 := 33, l4 := 44, l5 := 55, l6 := 66 PRIVATE iLoop diff --git a/harbour/tests/vidtest.prg b/harbour/tests/vidtest.prg index 2f2e04812f..0e05ab7102 100644 --- a/harbour/tests/vidtest.prg +++ b/harbour/tests/vidtest.prg @@ -149,7 +149,7 @@ STATIC FUNCTION WindowBounce() IF y[ i ] <= 0 .OR. y[ i ] + 12 >= MaxCol() dy[ i ] := - dy[ i ] ENDIF - next i + NEXT ++nFrames ENDDO