Shop
OBEX
P1 Docs
P2 Docs
Learn
Events
AND function help — Parallax Forums
toggle menu
Categories
Discussions
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Sign In
·
Register
×
Home
›
BASIC Stamp
AND function help
El Paisa
Posts:
375
2006-02-18 17:06
edited 2006-02-18 18:14
in
BASIC Stamp
It is possible in Pbasic this expression?
Btn = K AND &H3F
Thanks in advanced.
Comments
PJAllen
Banned
Posts:
5,065
2006-02-18 17:15
edited 2006-02-18 17:15
If it "tokenizes" then it's
possible
.
·
What's the deal?
·
El Paisa
Posts:
375
2006-02-18 17:43
edited 2006-02-18 17:43
apparently Pbasic only allows something like:
if K AND &H3F then goto (gosub) nnn
My question is how you code
··
Btn = K AND &H3F
·
in Pbasic
Tracy Allen
Posts:
6,658
2006-02-18 18:14
edited 2006-02-18 18:14
BTN = K & $3f
The operator & is Stampese bitwise AND in expressions.
The $ designates a HEX value.
The help menu shows this in the section of math operators.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Sign In
or
Register
to comment.
Comments
·
if K AND &H3F then goto (gosub) nnn
My question is how you code·· Btn = K AND &H3F·in Pbasic
The operator & is Stampese bitwise AND in expressions.
The $ designates a HEX value.
The help menu shows this in the section of math operators.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com