Prop IDE compile error?
Anyone run into this sort of 'error'? In the 'fix_hex' PUB, originally I had '=>' instead of '>=' and all I got was an '00' result on the LCD. But the compiler did NOT post any sign of an error. Took a lot of head scratching until I narrowed the problem down to that line; it was never taking that path, just the 'else',
Does '=>' have any meaning? If not why not a Compile error?
Does '=>' have any meaning? If not why not a Compile error?
PUB wr_hex
n := chr ' save value
chr >>= 4 ' get ms nybble
fix_hex ' convert to ASCii
chr := n & $0F ' get ls nybble
fix_hex
PUB fix_hex
if chr >= 10 ' check if greater than 9 (A..F)
chr += $37 ' form ASCII 'A'..'F'
else
chr += $30 ' else, form '0'..'9'
wr_LCD

Comments