Better Data comparison perhaps?
Oldbitcollector (Jeff)
Posts: 8,091
I've become a bit stumped over a simple data comparison I'm working on for a passcode demo.
Code looks something like this...
relevant portion shown..
For some reason my comparison sees the B entered first and thinks it's a complete match.
What am I not seeing?
Thanks
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
Code looks something like this...
relevant portion shown..
repeat if key == 16384 text.str(string("A")) code := code + "A" if key == 32768 text.str(string("B")) code := code + "B" if code == combination outa[noparse][[/noparse]8]:=0 '' Turn off P8 showing deactivaed. waitcnt(12_000_000 + cnt) DAT combination byte "BA",0
For some reason my comparison sees the B entered first and thinks it's a complete match.
What am I not seeing?
Thanks
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
Comments
code == word[noparse][[/noparse]@combination]
Solved it mathematically instead, but I see the error of my original method.
Thanks!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
As one of my college profs used to say, "Unfortunately computers do exacly what you tell them to do."
OBC, Glad you got it firgured out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney