Re: Wierd result when inverting an input
Originally Posted by
aratti
Thank you Dave for the suggestion, but no luck it doesn't work either. With "~" I get ascii 46 when portB.0 is false and the same ascii 47 when the portB.0 is True.
Looking into the manual the character for the NOT is "!", I could not find any reference to "~" as a NOT notation.
Cheers
Al.
The "tilde" character ~ is a BITWISE NOT. pp35 in the old green book, have misplaced my PBP3 book.
This works:
Code:
Bell var portB.6
Report var byte
main:
Report = ~~(Bell + 48)
debug report
pause 500
goto main
Last edited by Archangel; - 19th June 2015 at 18:02.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks