parenthesis problem

wm.chatman

Well-Known Member
Licensed User
Longtime User
Seems I got a slight problem with this:


'VC = Abs(Cos(DEGTORAD(VCOURSE))
If VC < 0.000001 Then
DLONG = VDistance / Cos(LaA)
LaB = LaA
Else '*** NOT E/W COURSE
'*** CALCULATE NEW LATITUDE
DLAT = Abs(VDistance * Cos(DegToRad(VCourse)
'*** CONVERT TO DEGREES
DLAT = DLAT / 60
'*** CONVERT TO RADIANS
DLAT = Abs(DegToRad(DLAT))

If NSA = "S" Then
If VCourse < 90 Then
LaB = LaA + DLAT
Else If VCourse < 180 Then
LaB = LaA - DLAT
Else If VCourse < 270 Then
LaB = LaA - DLAT
Else
LaB = LaA + DLAT
End If

Thx for your hlp

Best regards

WmC
 

Zenerdiode

Active Member
Licensed User
As Arrie states; you need to close as many parenthesis as you open. In the IDE, if you place your cursor on one (opening or closing) it will show you the associated one of the pair.

Even your commented line:

B4X:
'VC = Abs(Cos(DEGTORAD(VCOURSE))
has got three opening parenthesis but only two closing...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…