[futurebasic] FB Integer where it should be double?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2012 : Group Archive : Group : All Groups

From: Spencer Ted <tedspencer50@...>
Date: Sat, 26 May 2012 09:40:28 -0400
A snippet:

sigma1 = using "###.##";fn calcsigma(gInflections(_Voltage,closest),_rMin)// valley voltage
sigma2 = using "###.##";fn calcsigma(gInflections(_Voltage,closest+1),_rMax)// following peak voltage

edit field _efSigma,sigma1 + "/"+sigma2 

edit field _efPress,str$(fn calcsigma(gInflections(_Voltage,closest),_rMin))
edit field _efTimeBreath,str$(gInflections(_Voltage,closest)) + str$(_rMin)

local fn CalcSigma (inpressure as short, radius as short )
dim sigma as double
sigma = ((inpressure - 1000) * 49 * radius)\100000// radius is scaled up by 100, and pressure by 1000
end fn = sigma

Screen shot of several edit fields:
The edit field "Time/Breath" shows that 1109 and 40 were sent to fn CalcSigma, and edit field "Pressure" shows the result of fn CalcSigma.

The call to produce sigma2 is, as a result of the screen capture, flawed.

I'd expected to see a real number there, but it's an integer. Why?