' version 04-11-2016 ' compile with: fbc -s console Dim As String names(0 To ...) = { "North", "North by east", "North-northeast", _ "Northeast by north", "Northeast", "Northeast by east", "East-northeast", _ "East by north", "East", "East by south", "East-southeast", _ "Southeast by east", "Southeast", "Southeast by south", "South-southeast", _ "South by east", "South", "South by west", "South-southwest", _ "Southwest by south", "Southwest", "Southwest by west", "West-southwest", _ "West by south", "West", "West by north", "West-northwest", _ "Northwest by west", "Northwest", "Northwest by north", "North-northwest", _ "North by west", "North" } Dim As Double degrees(0 To ...) = { 0, 16.87, 16.88, 33.75, 50.62, 50.63, _ 67.5, 84.37, 84.38, 101.25, 118.12, 118.13, 135, 151.87, 151.88, 168.75, _ 185.62, 185.63, 202.5, 219.37, 219.38, 236.25, 253.12, 253.13, 270, _ 286.87, 286.88, 303.75, 320.62, 320.63, 337.5, 354.37, 354.38 } Dim As ULong i, j For i = LBound(degrees) To UBound(degrees) j = Int((degrees(i) + 5.625) / 11.25) If j > 31 Then j = j - 32 Print Using "####.## ## "; degrees(i); j; Print names(j) Next ' empty keyboard buffer While Inkey <> "" : Wend Print : Print "hit any key to end program" Sleep End