Hi,
Trying to convert a routine in C to B4A and get false results, believing that the code marked in red is wrongly converted. Anyone who could fix that for me?
Thanks a lot!
Robert
Sub PageNewUranometria(ra As Double, de As Double) As Int
Dim zone, rval As Int
Dim zone_splits() As Int
zone = Floor(90 - de) * 16 / 180 + 0.5
zone_splits = Array As Int(1, 6, 10, 12, 15, 18, 18, 20, 20, 20, 18, 18, 15, 12, 10, 6, 1)
rval = ((24 - ra) * zone_splits(zone) / 24 + .5)
rval = rval Mod zone_splits(zone)
[COLOR="Red"] Do While rval = rval - 1
zone = zone - 1
rval = rval + zone_splits(zone)
Loop[/COLOR]
Return rval + 1
End Sub