IF... THEN question.


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Posts
    13

    Default IF... THEN question.

    I can't find a definitive answer to this, is this legal?

    IF result = 15 OR result = 30 OR result = 45 OR result = 60 THEN
    xxx
    xxx
    ENDIF

    How many conditions can you use in an IF THEN ?

    Thanks!

  2. #2
    Join Date
    Feb 2005
    Location
    Holmfirth England
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: IF... THEN question.

    Hi,

    The conditions would be in brackets i.e.

    if (a = 1) or (a = 2) then

    I think the number is only limited by memory. I tried 10 no problem.

    Regards
    Bob

  3. #3
    Join Date
    Feb 2010
    Posts
    13


    Did you find this post helpful? Yes | No

    Default Re: IF... THEN question.

    Thanks a lot Bob!

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: IF... THEN question.

    It's still silly though.

    Code:
    var i byte ' counter
    
    FOR i = 15 TO 60 STEP 15
    
    IF result = i THEN
    xxx
    xxx
    ENDIF
    
    NEXT i
    Now the maximum in this situation is the overflow of i.

Members who have read this thread : 1

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

Posting Permissions

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