Help with Maxim Ibutton "IF THEN ELSE" statements please


Closed Thread
Results 1 to 39 of 39

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    Quote Originally Posted by andybarrett1 View Post
    Henrik

    You mean :-

    Now the WRONG subroutine will only execute if none of the three IF statements evalutate FALSE.

    Not near the units so cant try at moment !

    Thank you for reading
    No he means:-

    Now the WRONG subroutine will only execute if ALL of the three IF statements evalutate FALSE.
    Last edited by EarlyBird2; - 8th May 2014 at 09:31.

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


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    Quote Originally Posted by EarlyBird2 View Post
    No he means:-

    Now the WRONG subroutine will only execute if ALL of the three IF statements evalutate FALSE.
    So its like a :-

    IF NOT THEN

    Sorry for being so dim.....Thank you for help !

  3. #3
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    Not what was meant.

    All you need to do is change this

    else gosub wrong
    endif

    to this

    gosub wrong

    in your code

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    Hi,
    Now the WRONG subroutine will only execute if none of the three IF statements evalutate FALSE
    No, as have been said. If the first condition evalutes TRUE the execution will GOTO correct1 and therefor bypass the GOSUB WRONG statement. Same thing if the second or third condition evalutes TRUE. However, if none of the three conditions evalutes true the GOSUB WRONG will execute. Remember that the way you have your IF statment written it'll issue a GOTO, not GOSUB so make sure that your correct1, 2, 3 routines does not end with a RETURN.

    That is neat! Although I do not like using goto statements as they can make the program logic difficult to follow.
    I totally agree, GOTOs can lead to some real mess but sometimes it's the easy way.....and there's almost always more than one way to do what one wants.

    /Henrik.

  5. #5
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    In Scunthorpe to see the BOS plant?

    I am amazed but thinking about it I can not think of any other reason to come here.

    Hope you did not travel far!

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


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    Laughs...

    Yes BOS Plant ..... Told if Really lucky might get to see your 4 Queens of steel making too....

    Before dining in style at Deans on Brigg road !

    Thanks for help again all

  7. #7
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    You saw the four queens!

    I bet that made your day.

    I assume Deans is a burger van.

    You are welcome.

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


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    Will play about with it later...

    Am understanding more now

    Thank you

Similar Threads

  1. Replies: 0
    Last Post: - 14th November 2013, 03:32
  2. Replies: 3
    Last Post: - 15th October 2012, 08:06
  3. Replies: 8
    Last Post: - 3rd March 2011, 22:20
  4. Replies: 5
    Last Post: - 28th February 2011, 15:33
  5. Replies: 1
    Last Post: - 16th February 2005, 20:05

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