Why is this code not working?
Franklin
Posts: 4,747
I don't know why this does not work. I'm not very good with spin yet and am trying to convert a degree reading (0 - 360) to compass points. The error is "Expected end of line between the two N's on the NNE line. Any help appreciated.
PUB convertHeading (degrees) | Heading case degrees 0..11 : Heading := "N" 12..34 : Heading := "NNE" 35..56 : Heading := "NE" 57..79 : Heading := "ENE" 80..101 : Heading := "E" 102..124: Heading := "ESE" 125..146: Heading := "SE" 147..169: Heading := "SSE" 170..191: Heading := "S" 192..214: Heading := "SSW" 215..236: Heading := "SW" 237..259: Heading := "WSW" 260..281: Heading := "W" 282..304: Heading := "WNW" 305..326: Heading := "NW" 327..348: Heading := "NNW" 348..360: Heading := "N"
Comments
Jeff T.
While I like to write my own code, when I find something really elegant and useful I will snatch it up and put it to use -- such is the case with the rjdec() methd. That code (if under a different method name), I believe, was written by Dave Hein.