Results 1 to 10 of 10

Thread: how to call a procedure, that is not above the procedure calling it?

  1. #1
    Join Date
    Dec 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default how to call a procedure, that is not above the procedure calling it?

    thanks for anyone who answers

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    You have to forward the function/procedure.

  3. #3
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Alek000 View Post
    it would look something like this


    SCAR Code:
    procedure Forwarding;
    begin
      ForwardThis;
      DoOtherStuff;
    end;

    procedure ForwardThis; forward
    begin
    end;
    If I am not mistaken it should be this no? (I think you're incorrect)

    SCAR Code:
    procedure RunThis(); Forward;

    function DoStuff(): boolean;
    begin
      RunThis();
    end;

    procedure RunThis();
    begin

    end;
    Last edited by Blumblebee; 09-03-2010 at 03:54 AM.

  4. #4
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    The colon on the end of the first runthis should actually be a semi colon.

  5. #5
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what are you talking about

  6. #6
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    In most cases by reordering the flow you can avoid using forward but there are some cases where it is required..show us your code .
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  7. #7
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by Naum View Post
    The colon on the end of the first runthis should actually be a semi colon.
    Quote Originally Posted by Blumblebee View Post
    what are you talking about
    You have "procedure RunThis(); Forward;" and it should be "procedure RunThis(): forward;"

  8. #8
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    You have "procedure RunThis(); Forward;" and it should be "procedure RunThis(): forward;"
    No, it actually should be as he has it;
    SCAR Code:
    procedure Runthis; Forward;
    ...
    He edited it..
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  9. #9
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    kthx.

  10. #10
    Join Date
    Feb 2013
    Posts
    342
    Mentioned
    8 Post(s)
    Quoted
    110 Post(s)

    Default

    I know this thread is old but it helped me so I just want to say thanks to the above people (regardless of activity).

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
  •