Results 1 to 3 of 3

Thread: Catches

  1. #1
    Join Date
    Sep 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Catches

    Is there a Catch statement in the SCAR scripting language? I know that you could just do something like:

    SCAR Code:
    if [condition] then
        begin
          //do nothing if it's true
        end else
        begin
          Writeln('Condition was false!');
          exit;
        end;
    end;


    But it would be easier and cleaner with a Catch...

    -Macros

  2. #2
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm no expert with any other language, heck, not even with scar. What's a Catch?

  3. #3
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    I think this is the correct syntax:

    SCAR Code:
    try
      Code;
      MoreCode;
    except
      DoStuff;
    finally
      ThisIsOptional;
    end;
    :-)

Thread Information

Users Browsing this Thread

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

Posting Permissions

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