D devjet Member Licensed User Longtime User Jul 5, 2011 #1 Hello, what is wrong with this code? it throws a syntax error even if I use power. The error is at line DA = Sub btnCalc_Click Dim Temp As Int Dim DA As Int Dim T_S As Double Dim T_act_K As Double T_S = 273.15-(0.0019812*edtPA.Text -15) If rdoTF = 1 Then T_act_K = (273.15+((edtTemp.Text + 40) / 9 * 5) -40) ' using F° Else T_act_K = (273.15 + edtTemp.Text) ' using C° End If DA = edtPA.Text + (T_S/0.0019812) * (1-(T_S / T_act_K) ^ 0.2349690) End Sub
Hello, what is wrong with this code? it throws a syntax error even if I use power. The error is at line DA = Sub btnCalc_Click Dim Temp As Int Dim DA As Int Dim T_S As Double Dim T_act_K As Double T_S = 273.15-(0.0019812*edtPA.Text -15) If rdoTF = 1 Then T_act_K = (273.15+((edtTemp.Text + 40) / 9 * 5) -40) ' using F° Else T_act_K = (273.15 + edtTemp.Text) ' using C° End If DA = edtPA.Text + (T_S/0.0019812) * (1-(T_S / T_act_K) ^ 0.2349690) End Sub
K kickaha Well-Known Member Licensed User Longtime User Jul 5, 2011 #2 This line compiles and, as far as I can tell, does what you want B4X: DA = edtPA.Text + (T_S/0.0019812) * (Power (1-(T_S / T_act_K), 0.2349690)) Upvote 0
This line compiles and, as far as I can tell, does what you want B4X: DA = edtPA.Text + (T_S/0.0019812) * (Power (1-(T_S / T_act_K), 0.2349690))
D devjet Member Licensed User Longtime User Jul 5, 2011 #3 thanks, kickaha two replies in on my issue during a page refresh ! Upvote 0