Results 1 to 4 of 4

Thread: condition check

  1. #1
    Join Date
    Nov 2004
    Posts
    35

    Unanswered: condition check

    i got a problem over here.

    for 1..10 loop
    if a=true then
    ...
    else
    ...
    end if;
    if b=true then
    ...
    end if;

    end loop;

    is there any way to do if a=true then will NOT go into the 2nd if.

  2. #2
    Join Date
    Sep 2004
    Posts
    17
    Code:
    for 1..10 loop
      if a=true then
        ...
       else
        ...
        if b=true then
          ...
        end if;
      end if;
    end loop;
    or
    Code:
    for 1..10 loop
      if a=true then
        ...
       else
        ...
      end if;
      if a=false and b=true then
        ...
      end if;
    end loop;
    Alex

  3. #3
    Join Date
    Nov 2004
    Posts
    35
    i am afraid that is impossible.
    the reason is that wat i wrote is just a simple/narrow down of my code.
    and i have a few for loop inside the if else statement..
    any other way?

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    I don't really understand your objection to Alex's answer, but anyway...
    Code:
    for 1..10 loop
      if a then
        ...
      else
        ...
      end if;
      if b and not a then
        ...
      end if;
    end loop;

Posting Permissions

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