[Gambas-user] Arithmetic failure in project

Doriano Blengino doriano.blengino at ...1909...
Fri Oct 2 16:17:55 CEST 2009


Horst Günther Burkhardt III ha scritto:
> On Mon, 2009-09-21 at 21:20 +0200, Charlie Reinl wrote:
>   
>> Am Dienstag, den 22.09.2009, 03:42 +1000 schrieb Horst Günther Burkhardt
>> III:
>>     
>>> Hey everybody. 
>>>
>>> I'm building a basic flash exposure calculator with floats and extremely
>>> precise arithmetic, to benefit those of us who happen to list
>>> photography among our hobbies ;)
>>>
>>> Unfortunately, I've run into several issues with the code. 
>>>
>>> The foremost of which: no matter the data that is plugged in, the result
>>> is always 0. 
>>>
>>> Also, my case construct for power adjustment is ... considerably failed.
>>>
>>> Attached are my .form .class and a screenshot of the result i get.
>>>
>>> Thanks in advance for all your help :)
I didn't tried your project, but in a previous mail I saw someone saying 
that there were variables not initialized.

Well, this is what the integrated debugger is for. Put a breakpoint on 
(or before) the line that does the final computation, and check the 
value of every variable  (just doubleclick on it). If all the variables 
have the correct value, then the final formula has some problem. Break 
it in several pieces, and check/debug again.

Perhaps you will find someone else that will do it for you, but in this 
case, I think, a little debugging would have point out the error, 
whether your or gambas's.

Regards,
Doriano





More information about the User mailing list