diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 97c17a8a60..a7d9416105 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-17 12:45 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/hbnf/acctmnth.prg + * contrib/hbnf/acctyear.prg + * contrib/hbnf/madd.prg + * contrib/hbnf/popadder.prg + * contrib/hbnf/round.prg + ! fixed wrongly formatted negative numbers + 2012-10-17 11:43 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbnf/popadder.prg * minor formatting (in part to be more hbformat friendly) diff --git a/harbour/contrib/hbnf/acctmnth.prg b/harbour/contrib/hbnf/acctmnth.prg index 1e617491ac..b1e67541af 100644 --- a/harbour/contrib/hbnf/acctmnth.prg +++ b/harbour/contrib/hbnf/acctmnth.prg @@ -45,7 +45,7 @@ FUNCTION FT_ACCTMONTH( dGivenDate, nMonthNum ) IF dGivenDate < aRetVal[ 2 ] - dGivenDate := FT_MADD( dGivenDate, - 1 ) + dGivenDate := FT_MADD( dGivenDate, -1 ) aRetVal := FT_MONTH( dGivenDate ) nMTemp -= 1 IF nMTemp == 0 diff --git a/harbour/contrib/hbnf/acctyear.prg b/harbour/contrib/hbnf/acctyear.prg index 44b17e69c4..f4d9d189f4 100644 --- a/harbour/contrib/hbnf/acctyear.prg +++ b/harbour/contrib/hbnf/acctyear.prg @@ -41,7 +41,7 @@ FUNCTION FT_ACCTYEAR( dGivenDate ) IF dGivenDate < aRetVal[ 2 ] - aRetVal := FT_YEAR( FT_MADD( dGivenDate, - 1 ) ) + aRetVal := FT_YEAR( FT_MADD( dGivenDate, -1 ) ) nYTemp-- aRetVal[ 2 ] := FT_ACCTADJ( aRetVal[ 2 ] ) aRetVal[ 3 ] := FT_ACCTADJ( aRetVal[ 3 ], .T. ) diff --git a/harbour/contrib/hbnf/madd.prg b/harbour/contrib/hbnf/madd.prg index d408907bec..0df385779a 100644 --- a/harbour/contrib/hbnf/madd.prg +++ b/harbour/contrib/hbnf/madd.prg @@ -45,7 +45,7 @@ FUNCTION FT_MADD( dGivenDate, nAddMonths, lMakeEOM ) /* Work with 1st of months.*/ FOR i := 1 TO Abs( nAddMonths ) - dTemp += iif( nAddMonths > 0, 31, - 1 ) + dTemp += iif( nAddMonths > 0, 31, -1 ) dTemp += 1 - Day( dTemp ) NEXT diff --git a/harbour/contrib/hbnf/popadder.prg b/harbour/contrib/hbnf/popadder.prg index 054dabba60..6cfe2c3fdf 100644 --- a/harbour/contrib/hbnf/popadder.prg +++ b/harbour/contrib/hbnf/popadder.prg @@ -874,8 +874,8 @@ STATIC FUNCTION _ftRoundIt( nNumber, nPlaces ) nPlaces := iif( nPlaces == NIL, 0, nPlaces ) - RETURN iif( nNumber < 0.0, - 1.0, 1.0 ) * ; - Int( Abs( nNumber ) * 10 ^ nPlaces + 0.50 + 10 ^ - 12 ) / 10 ^ nPlaces + RETURN iif( nNumber < 0.0, -1.0, 1.0 ) * ; + Int( Abs( nNumber ) * 10 ^ nPlaces + 0.50 + 10 ^ -12 ) / 10 ^ nPlaces /*+- Function ---------------------------------------------------------------+ | Name: _ftDivide() Docs: Keith A. Wire | diff --git a/harbour/contrib/hbnf/round.prg b/harbour/contrib/hbnf/round.prg index 25a2c9612f..50c216d430 100644 --- a/harbour/contrib/hbnf/round.prg +++ b/harbour/contrib/hbnf/round.prg @@ -64,7 +64,7 @@ FUNCTION FT_ROUND( nNumber, nRoundToAmount, cRoundType, cRoundDirection, ; ; // Are We Rounding Up?? iif( Left( cRoundDirection, 1 ) == ROUND_UP, ; ; // Yes, Make Upward Adjustment - - 1 / ( nRoundToAmount ) / 2, ; + -1 / nRoundToAmount / 2, ; ; // No, Rounding Normal, No Adjustment 0 ) ) //Do the Actual Rounding