SRL Archive - General

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


dopeness

2010-09-02 21:47:27

thanks for anyone who answers

mormonman

2010-09-02 22:17:11

You have to forward the function/procedure.

Blumblebee

2010-09-02 22:58:05

From: Alek000
it would look something like this


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)


procedure RunThis(); Forward;

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

procedure RunThis();
begin

end;

Naum

2010-09-02 23:23:35

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

Blumblebee

2010-09-02 23:54:14

what are you talking about :rolleyes:

Sex

2010-09-03 00:15:49

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 :p.

i luffs yeww

2010-09-03 00:36:18

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


From: Blumblebee
what are you talking about :rolleyes:


You have "procedure RunThis(); Forward;" and it should be "procedure RunThis(): forward;"

Sex

2010-09-03 04:49:55

From: i luffs yeww
You have "procedure RunThis(); Forward;" and it should be "procedure RunThis(): forward;"

No, it actually should be as he has it;
procedure Runthis; Forward; 
…
He edited it..

i luffs yeww

2010-09-04 03:08:12

kthx.

GetHyper

2015-06-17 11:53:56

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