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

    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!

  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

    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

  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

    You saw the four queens!

    I bet that made your day.

    I assume Deans is a burger van.

    You are welcome.

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

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

    Steve, I beg to differ about your statement:"Your if correct then labels construction can not be in one line format." Oh really, and what makes you say that? If the statement is TRUE the operation is passed to the address of Correct#. Although it is not the way I would write the compound statement it is 100% acceptable.
    Dave Purola,
    N8NTA
    EN82fn

  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

    Quote Originally Posted by Dave View Post
    Steve, I beg to differ about your statement:"Your if correct then labels construction can not be in one line format." Oh really, and what makes you say that? If the statement is TRUE the operation is passed to the address of Correct#. Although it is not the way I would write the compound statement it is 100% acceptable.
    Dave you are correct as Henrik's post has already demonstrated. We both agree that we would not write the compound statement this way. My biggest objection is the use of the 'goto' statement which although perfectly valid is an instruction I was taught not to use a long time ago. I read the "Correct#" as a gosub instruction not a goto statement which was my mistake.

  6. #6
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

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

    It is typically necessary to use parenthesis between logical comparisons as:

    If (Serial[1]=$15) and (Serial[2]=$D3) and (Serial[3]=$7D) AND (Serial[4]=$16) AND (Serial[5]=$00) AND (Serial[6]=$00) then correct1

    I believe that it forces a Boolean comparison rather than a mathematical evaluation.

    One last - is it necessary to compare ALL bytes, or might you only compare say... the first one. This would seem to yield a unique condition and save the effort and complexity of so long a line:

    If (Serial[1]=$15) then Correct1

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

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

    Quote Originally Posted by Amoque View Post
    ...

    One last - is it necessary to compare ALL bytes, or might you only compare say... the first one. This would seem to yield a unique condition and save the effort and complexity of so long a line:

    If (Serial[1]=$15) then Correct1

    Speaking out my bellybutton, I'd say yes. The other serial numbers still have to be validated (knowing absolutely nothing about his application).

    Robert

Similar Threads

  1. Replies: 0
    Last Post: - 14th November 2013, 04:32
  2. Replies: 3
    Last Post: - 15th October 2012, 09:06
  3. Replies: 8
    Last Post: - 3rd March 2011, 23:20
  4. Replies: 5
    Last Post: - 28th February 2011, 16:33
  5. Replies: 1
    Last Post: - 16th February 2005, 21: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