[Gambas-user] Math Operation
cheikh diabang
cheikhdiabang at ...67...
Thu May 4 12:05:16 CEST 2017
hello. i have write this code below on gambas 3.9.2 and when i run that, he indique syntaxe error
Function calcul_coefficients(x As Integer, y As Integer, degre As Integer) As Float
'Dim ak As Float
Dim a As Float
Dim b As Float
Dim c As Float
Dim nbr_coef As Integer
Dim k As Integer
nbr_coef = degre + 1
For k = 0 To degre
If k == 0
'ak = (nbr_coef ^ k * ((x ^ (2(1 / (k + 1)))) * y) - (x * (y * (x ^ (- (k - 1)))))) / ((nbr_coef * x ^ 2) - ((x) ^ 2))
c = (nbr_coef ^ k * ((x ^ (2(1 / (k + 1)))) * y) - (x * (y * (x ^ (- (k - 1)))))) / ((nbr_coef * x ^ 2) - ((x) ^ 2))
Else If k == 1
b = ((nbr_coef ^ k) * ((x ^ (2(1 / (k + 1)))) * y) - (x * (y * (x ^ (- (k - 1)))))) / ((nbr_coef * x ^ 2) - ((x) ^ 2))
Else If k == 2
a = ((nbr_coef ^ k) * ((x ^ (2(1 / (k + 1)))) * y) - (x * (y * (x ^ (- (k - 1)))))) / ((nbr_coef * x ^ 2) - ((x) ^ 2))
Else
Message.Info("unavalaible coefficients")
Next
Return a, b, c
End
But i see nothing as error. I need help please
More information about the User
mailing list