Results 1 to 3 of 3

Thread: Need Help With Using "Case" and "Of"

  1. #1
    Join Date
    Jun 2007
    Location
    #SRL
    Posts
    200
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default Need Help With Using "Case" and "Of"

    ok so, i was wondering how to make 2 things happen at the same time when using case of like:

    Code:
    Program New;
    
    var
    x,y: Integer;
    
    begin
      x:= 1;
      Case x of
    
        1 : x:= 0; y:= 1;
    
      end;
    end.
    or like:
    Code:
    Program New;
    
    var
    x,y: Integer;
    
    begin
      x:= 1;
      Case x of
      
        1 : x:= 0;
    
        1 : y:= 1;
    
      end;
    end.
    or what?
    plz help me out here

  2. #2
    Join Date
    Apr 2007
    Location
    California
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Program New;

    var
      x,y: Integer;

    begin
      x:= 1;
      case x of
        1:
        begin
          x:= 0;
          y:= 1;
        end;
      end;
    end.

    Dunno if those are the right standards for it though..That's just how i always write it. But that's how you'd do it.

  3. #3
    Join Date
    Jun 2007
    Location
    #SRL
    Posts
    200
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    oh tyvm!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. A nicer way to do a "case"
    By CheetahNub in forum OSR Help
    Replies: 13
    Last Post: 10-16-2007, 07:12 PM
  2. action="www.site.com" method="post"
    By Jason2gs in forum General
    Replies: 4
    Last Post: 05-17-2007, 11:50 PM
  3. Replies: 3
    Last Post: 04-19-2007, 03:44 AM
  4. Noob "case" Q.
    By Junior in forum OSR Help
    Replies: 3
    Last Post: 03-25-2007, 04:56 PM
  5. Replies: 5
    Last Post: 10-26-2006, 11:30 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
  •