2 Replies Latest reply on Nov 29, 2006 4:45 AM by Newsgroup_User

    Conditions in case statement

    Level 7
      Hello :

      Is it possible to make something like this conditions in a Case statment?:

      Case mycondition of
      (mycondition >= 10 and mycondition <= 50 ):
      --do this
      .
      .

      etc...
      end Case

      I know that can use If conditional but is it possible of the above?

      Thanks in advance


        • 1. Re: Conditions in case statement
          Level 7
          Try:

          case (true) of
          (mycondition >= 10 and mycondition <= 50 ):
          --do this
          (mycondition >= 100 and mycondition <= 150 ):

          etc.
          end case



          > Case mycondition of
          > (mycondition >= 10 and mycondition <= 50 ):
          > --do this
          > .
          > .
          >
          > etc...
          > end Case


          • 2. Re: Conditions in case statement
            Level 7
            By the way, you MUST use parenthesis around each case when you use this
            format.

            --
            Craig Wollman
            Lingo Specialist
            Word of Mouth Productions
            212-928-9581

            www.wordofmouthpros.com
            "Anne" <anmalo42@lycos.es> wrote in message
            news:ekjkd0$vn$1@forums.macromedia.com...
            > Hello :
            >
            > Is it possible to make something like this conditions in a Case statment?:
            >
            > Case mycondition of
            > (mycondition >= 10 and mycondition <= 50 ):
            > --do this
            > .
            > .
            >
            > etc...
            > end Case
            >
            > I know that can use If conditional but is it possible of the above?
            >
            > Thanks in advance
            >
            >