Very quick question... To help a dim wit !!


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237

    Default Very quick question... To help a dim wit !!

    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

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,956


    Did you find this post helpful? Yes | No

    Default Re: Very quick question... To help a dim wit !!

    Because you have wrong if-then syntax:

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

  3. #3
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: Very quick question... To help a dim wit !!

    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

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Very quick question... To help a dim wit !!

    Quote Originally Posted by andybarrett1 View Post
    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.
    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.

  5. #5
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: Very quick question... To help a dim wit !!

    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 !!

Similar Threads

  1. Quick DTMFOUT Question
    By rocket_troy in forum General
    Replies: 5
    Last Post: - 8th July 2014, 05:57
  2. Quick PIC16F874A question
    By ERMEGM in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 28th June 2014, 08:09
  3. A quick question.....
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2010, 14:25
  4. Interrupt Quick Question
    By shawn in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th January 2005, 05:51
  5. quick question
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd December 2004, 01:45

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts