Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Posts
    49

    Building an expression with OR

    (%db_versie_oud% <> 4403) OR (%db_versie_oud% <> 4500)

    Can someone tell me what is wrong with the above expression?

    I want to make a if statement like this:

    if ((%db_versie_oud% <> 4403) OR (%db_versie_oud% <> 4500))
    messagebox(your db version is not 4403 or 4500)
    end if

    Thanks in advance for the tips!

    Brian

  2. #2
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Tip (?):
    Have you tried AND in stead of OR?

  3. #3
    Join Date
    Oct 2003
    Posts
    49
    Doesn't look logical to me, but works!

    Fenks!

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. When you use AND it requires both conditional statements to be "true" whereas when you use OR it requires only one (either) of the conditional statements to be true...

    Corey Milner
    Creative Director, Indigo Rose Software

  5. #5
    Join Date
    Oct 2003
    Posts
    49
    Try it in SF6, when i use OR and one of the conditions is true it will fail.

    When i use AND, and one of de conditions is true is will go!

    if ((%db_versie_oud% <> "4403") AND (%db_versie_oud% <> "4500"))
    ShowmsgBox(one of the db_versie_oud is true)
    End if

    when is use

    if ((%db_versie_oud% <> "4403") OR (%db_versie_oud% <> "4500"))
    ShowmsgBox(one of the db_versie_oud is true)
    End if

    and is set %db_versie_oud% to 4500 or 4403 it will fail.

    See attachment (startup actions)
    Attached Files
    Last edited by brianlesker; 09-10-2004 at 03:13 AM.

Similar Threads

  1. HOWTO: Use OR in an Expression
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-30-2002, 12:37 PM
  2. HOWTO: Use OR in an Expression
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-30-2002, 12:35 PM
  3. SUF6004: Error in expression evaluation
    By Hajo in forum Setup Factory 6.0
    Replies: 4
    Last Post: 02-22-2002, 08:30 AM
  4. Add "" to Build Expression Window
    By garhop in forum Setup Factory 6.0
    Replies: 0
    Last Post: 12-09-2001, 10:50 PM

Posting Permissions

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