Revision history [back]

[ROUNDDOWN() is a function of doubtable justification. It actually does not round down the value it got, but rounds down the absolute amount of it and then glues the screwed off sign back the result.]

In BASIC you will not need a Calc function called via a FunctionAccess object in the above situation but simply a replacement of ROUNDDOWN using a BASIC function doing the same thing if applied to a positive value - as you will have.

newLeds = Int((iCount*hoursD*30/lifeLed)*10)/10


[If you actually had negative values and wanted them treated as ROUNDDOWN would do, you had to use the BASIC function 'Fix' instead of 'Int'.]

[ROUNDDOWN() is a function of doubtable justification. It actually does not round down the value it got, but rounds down the absolute amount of it and then glues the screwed off sign back the result.]

In BASIC you will not need a Calc function called via a FunctionAccess object in the above situation but simply a replacement of ROUNDDOWN using a BASIC function doing the same thing if applied to a positive value - as you will have.have - in the following way:

newLeds = Int((iCount*hoursD*30/lifeLed)*10)/10


[If you actually had negative values and wanted them treated as ROUNDDOWN would do, you had to use the BASIC function 'Fix' instead of 'Int'.]

[ROUNDDOWN() is a function of doubtable justification. It actually does not round down the value it got, but rounds down the absolute amount of it and then glues the screwed off sign back to the result.]

In BASIC you will not need a Calc function called via a FunctionAccess object in the above situation but simply a replacement of ROUNDDOWN using a BASIC function doing the same thing if applied to a positive value - as you will have - in the following way:

newLeds = Int((iCount*hoursD*30/lifeLed)*10)/10


[If you actually had negative values and wanted them treated as ROUNDDOWN would do, you had to use the BASIC function 'Fix' instead of 'Int'.]