[Gambas-user] Arithmetic failure in project..Solution

Horst Günther Burkhardt III horst at ...2298...
Sun Oct 4 06:41:45 CEST 2009


On Fri, 2009-10-02 at 23:11 -0500, nando wrote:
> Friend,
> I have gone through your project and I ran it with these changes:
> 
> (1) in SUB action_click...insert above this line:
> result = (exposure * (guidenumber / distance) * (flashcompensation) * (multicompensation))
> 
> these four lines:
> 
> IF gn_feet.Value = TRUE THEN guidenumber = (input_gn.Value / 3.3)
> IF gn_metres.Value = TRUE THEN guidenumber = input_gn.Value
> distance = input_distance.Value
> if distance = 0 then distance = 0.00001  'to prevent divide by zero error
> result = (exposure * (guidenumber / distance) * (flashcompensation) * (multicompensation))
> 
> (2)
> Remove or REM the 3 line sub:
> PUBLIC SUB input_distance_KeyPress()
> distance = (input_distance.Value)
> END

Hello there :)

Yes, that solves the basic calculation problem.

I'm still having an issue with CASE input_power.Selection ... it just
doesn't work, expects an object instead of a string or some such...

Thanks very much! 

-- Horst.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20091004/df5cca07/attachment.sig>


More information about the User mailing list