closing parenthesis missing

Just starting out? Need help? Post your questions and find answers here.
Golfy
User
User
Posts: 97
Joined: Wed Mar 21, 2012 6:10 pm

closing parenthesis missing

Post by Golfy »

I use Purebasic 5.00 (x64 and x86)

In a full program (about rising/setting sun hour) there is this line

Code: Select all

  cosH     = ((-0,01454) - (sinDec * Sin(latitude)))/(cosDec * Cos(latitude))
However, I can't compile because error message appears about closing parenthesis ("parenthese fermante ')' manquante")
I've tried to add parenthesis in excess (especially closing one's) without success... :lol:

Code: Select all

coH=(-0,01454-(siDec*Sin(latitude))))))/(coDec*Cos(latitude))))))
I feel there is a bug in IDE analyze because without space and even if I change variablename, nothing better appends :(

[Edit] *oups* there is a ',' in place of '.' in first negative number... however, should IDE tells about parenthesis ???
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: closing parenthesis missing

Post by MachineCode »

Replace the , with . and it compiles correctly. The , makes the compiler think another parameter is coming, and it thinks a closing parenthesis is missing as a result. So it's not a bug, but a user error, because you can't use , in numbers in programming.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
Post Reply