PDA

View Full Version : Very quick question... To help a dim wit !!



andybarrett1
- 6th October 2014, 10:30
Hi Thank you for reading.

Why does :-



Check
IF news = $07 then Part1
IF news = $06 then Part1
IF news = $0A then Part1
IF news = $0C then Part1
Goto Check

Not work the same as :-

Check
IF news = $07 or $06 or $0A or $0C then Part1
Goto Check


Top option 4 lines works but not the single line option....

I know it simple....I think.. What am I missing?

Thank You

Andy

Ioannis
- 6th October 2014, 10:35
Because you have wrong if-then syntax:



IF news = $07 or news = $06 or news = $0A or news = $0C then Part1


Ioannis

andybarrett1
- 6th October 2014, 10:58
Hi...

But what would the right "if-then" would be for this ??

Sorry.... Just seen it in the code tags
Thank you... Makes sense now !



BR
Andy

Archangel
- 6th October 2014, 18:28
Hi...

But what would the right "if-then" would be for this ??

Andy
Hi Andy,
The "right" one is the one that works for YOU the person doing the programming. Many options exist. If Then is a Boolean or true false expression. You could use select case, or branch, on goto to acheive the same results.

andybarrett1
- 6th October 2014, 21:01
Hi

I was referring back to my first post…. I just missed the Syntax…! My Bad.

Point is good and I have learned that very thing here time and time again….So much to learn so little time.

Work gets in the way ….. But buys the chips…

Thank you all for help !!