Here is code I am using:
this code is in main module
Here is the sub being called from module "modppc1"
"strbearing" is a global variable declared in the main module as public
"strdeg" is a global variable declared in modppc1 module. Neither are declared anywhere else so I don't know which 'local' variable is referred to in the message "local variable cannot hide global variable". This code works in other versions of basic.
Thanks for any help.. Jim Schuchert
this code is in main module
B4X:
strbearing=modppc1.strdeg
If StrLength(strbearing) = 5 Then
CallSub("modppc1.convertangle",strbearing, 1, 1, 2, 2, 4, 2)
End If
Here is the sub being called from module "modppc1"
B4X:
Sub convertangle(strbearing, a, b, c, d1, E, f)
'Dim stenths, icntr, dsnum, dtenths
intDnum = SubString(strBearing, a, b)
intmnum = SubString(strBearing, c, d1)
intsnum = SubString(strBearing, E, f)
dblAngle = intDnum + intmnum / 60 + intsnum / 3600
skipnext:
If StrIndexOf(strBearing, "-",0) > 0 Then _
dblAngle = dblAngle * (-1)
End Sub
"strbearing" is a global variable declared in the main module as public
"strdeg" is a global variable declared in modppc1 module. Neither are declared anywhere else so I don't know which 'local' variable is referred to in the message "local variable cannot hide global variable". This code works in other versions of basic.
Thanks for any help.. Jim Schuchert