My max value I put was 13.1 and I thought that range would be great, but the other day we received a value 13.3 and of course the calculator gave a result of zero because it was not setup to exceed the value of 13.1.
I’m wondering if there is an improvement to my code to increase the range?
Thanks for looking.
Code: Select all
brixx:= Round(brix,1)
data:= (brixx="10.1")?("10.40")
:(brixx="10.2")?("10.40")
:(brixx="10.3")?("10.41")
:(brixx="10.4")?("10.41")
:(brixx="10.5")?("10.41")
:(brixx="10.6")?("10.42")
:(brixx="10.7")?("10.42")
:(brixx="10.8")?("10.43")
:(brixx="10.9")?("10.43")
:(brixx="11.0")?("10.43")
:(brixx="11.1")?("10.44")
:(brixx="11.2")?("10.44")
:(brixx="11.3")?("10.45")
:(brixx="11.4")?("10.45")
:(brixx="11.5")?("10.46")
:(brixx="11.6")?("10.46")
:(brixx="11.7")?("10.46")
:(brixx="11.8")?("10.47")
:(brixx="11.9")?("10.47")
:(brixx="12.0")?("10.48")
:(brixx="12.1")?("10.48")
:(brixx="12.2")?("10.49")
:(brixx="12.3")?("10.49")
:(brixx="12.4")?("10.49")
:(brixx="12.5")?("10.50")
:(brixx="12.6")?("10.50")
:(brixx="12.7")?("10.51")
:(brixx="12.8")?("10.51")
:(brixx="12.9")?("10.52")
:(brixx="13.0")?("10.52")
:(brixx="13.1")?("10.52")
:("Else")
;MsgBox % data
ans:= Round(lbs/data,3)
;MsgBox, % ans
ImpGal := ans
GuiControl,, Final, %ImpGal%
return