EditText or label and float value

yann

New Member
Licensed User
Longtime User
Hi ,
I 've used many years basic4ppc, but now i 'am using basic4android.
Sorry for this "basic" question, but after "But_Calcul_click action",
the result is always wrong.
I think that i have forget something....

Sub But_Calcul_Click

Dim temp As Float
Dim press As Float
Dim ktpresult As Float

TFtemp.Text= temp
TFpress.Text= press
ktpresult=(293.2/(273.2+temp))*(press/1013)
lblKTP.Text=ktpresult

End Sub

Could you help me?
thanks.
 

wl

Well-Known Member
Licensed User
Longtime User
I guess the assignment should be the other way around:

temp = TFtemp.Text
press = TFpress.Text


Because you are not assigning any values to these variables you are using in your calculation.
 
Upvote 0
Top