[Gambas-user] Arithmetic failure in project
Horst Günther Burkhardt III
horst at ...2298...
Mon Sep 21 19:42:40 CEST 2009
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 :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FMain.class
Type: application/x-java
Size: 9681 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20090922/e1a188b7/attachment.bin>
-------------- next part --------------
# Gambas Form File 2.0
{ Form Form
MoveScaled(0,0,48,24)
Background = Color.Background
Text = ("Final Solution Flash Calculator")
Border = Window.Fixed
{ din Frame
MoveScaled(2,2,34,6)
Text = ("Sensitivity")
{ din_decor Label
MoveScaled(10,2,5,3)
Text = ("\xC2\xB0DIN")
}
{ asa Label
MoveScaled(17,2,6,3)
Text = ("25")
Alignment = Align.Right
}
{ asa_decor Label
MoveScaled(24,2,9,3)
Text = ("\xC2\xB0ASA/ISO")
}
}
{ input_din SpinBox
MoveScaled(4,4,7,3)
MinValue = 15
MaxValue = 33
}
{ strobe Frame
MoveScaled(2,9,33,9)
Text = ("Strobe Setting")
{ input_gn ValueBox
MoveScaled(1,2,7,3)
ToolTip = ("The average mean of the guide numbers of the strobes you are using. \n\nGuide numbers are in feet, at 21\xC2\xB0 (100 ASA).")
MaxLength = 3
}
{ labelgnft Label
MoveScaled(8,2,12,3)
Text = ("Guide Number")
}
{ input_power ComboBox
MoveScaled(21,2,11,3)
ToolTip = ("If your flashes have a power restriction setting, dial it in here.")
Text = ("Power")
List = [("1/1"), ("1/2"), ("1/4"), ("1/8"), ("1/16"), ("1/32"), ("1/64"), ("1/128"), ("1/256")]
}
{ gn_feet RadioButton
MoveScaled(1,5,8,3)
ToolTip = ("Guide Number is set in Feet (American units)")
Text = ("Feet")
}
{ gn_metres RadioButton
MoveScaled(11,5,10,3)
ToolTip = ("Guide Number is set in Metres (Japanese and European units)")
Text = ("Metres")
}
}
{ multi Frame
MoveScaled(37,2,9,6)
Text = ("Flashes")
{ multiflash SpinBox
MoveScaled(1,2,7,3)
ToolTip = ("The number of strobes you are using. ")
MinValue = 1
MaxValue = 8
Value = 1
}
}
{ target Frame
MoveScaled(36,9,10,9)
Text = ("Target")
{ input_distance ValueBox
MoveScaled(1,2,8,3)
ToolTip = ("Target distance in metres. ")
}
{ label_unit Label
MoveScaled(1,6,7,2)
Text = ("metres")
Alignment = Align.Center
}
}
{ action Button
MoveScaled(2,19,10,3)
Text = ("Compute!")
}
{ labelfstop Label
MoveScaled(13,19,20,3)
Text = ("recommended \xC6\x92 /stop:")
Alignment = Align.Right
}
{ output_f Label
MoveScaled(34,19,9,3)
Text = ("\xC6\x92 / ")
Alignment = Align.Center
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flashcomputer-trial1.png
Type: image/png
Size: 7000 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20090922/e1a188b7/attachment.png>
-------------- 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/20090922/e1a188b7/attachment.sig>
More information about the User
mailing list