Case and ">" spin question
Ltech
Posts: 380
I try to shorten a program in spin.
Snipper to build packets out of a variable from 0 to 360
case atoi(lat,3) ' 0...360 >99 : addToPacket(DD+0, 1) ' Write hundreds IF applicable addToPacket(DD+1, 1) ' Write tens addToPacket(DD+2, 1) ' Write ones
<10 : addToPacket(DD+2, 1) ' Write ones
OTHER : addToPacket(DD+1, 1) ' Write tens addToPacket(DD+2, 1) ' Write ones
But bts compiler did not be lucky about the > and < I try =>
Snipper to build packets out of a variable from 0 to 360
case atoi(lat,3) ' 0...360 >99 : addToPacket(DD+0, 1) ' Write hundreds IF applicable addToPacket(DD+1, 1) ' Write tens addToPacket(DD+2, 1) ' Write ones
<10 : addToPacket(DD+2, 1) ' Write ones
OTHER : addToPacket(DD+1, 1) ' Write tens addToPacket(DD+2, 1) ' Write ones
But bts compiler did not be lucky about the > and < I try =>
Comments
case atoi(lat, 3) 0..9: addToPacket(DD+2, 1)
10..99: addToPacket(DD+1, 1) addToPacket(DD+2, 1)
other: addToPacket(DD+0, 1) addToPacket(DD+1, 1) addToPacket(DD+2, 1)
Thank-you