SRL Archive - Help and Support

Pointers?


WhoCares357

2007-04-17 16:42:54

I read a tutorial here once that said of a way to create a checkpoint and go back to it if a condition. Someone told me this is called Pointers. I'm not sure if that is the correct name, but could someone show me an example of this?

Ejjman

2007-04-17 19:21:12

hm..I need to know this aswell, and I't break a lot of my extra script crap.

WhoCares357

2007-04-17 22:28:45

As I said, I saw a tut on this once, but I can't find it anymore.

bullzeye95

2007-04-17 22:42:45

Are you talking about labels?

WhoCares357

2007-04-17 23:14:29

From: bullzeye95
Are you talking about labels?


Yeah, that's what it was called. You know how to use it? If you could give a short example, I would really appreciate it.

Starblaster100

2007-04-18 11:50:02


program lblTest;

label
lblBack;

var
Count: Integer;

begin
lblBack:
WriteLn('Hello');
Count := Count + 1;
if Count < 5 then goto lblBack;
end.

omgh4x0rz

2007-04-18 13:23:28

So…allows you to do recursion basically?

WhoCares357

2007-04-18 14:54:35

Ah, thank you much. I really appreciate this ;).

Yakman

2007-04-18 17:15:40

From: omgh4x0rz
So…allows you to do recursion basically?


you can already do that, scar does allow a procedure/function to call itself, the SRL LoginPlayer uses it

Ejjman

2007-04-18 17:54:15

omg Sb tytytyy

bullzeye95

2007-04-18 18:47:11

Recursion? What's that? Is that like the forward keyword?

omgh4x0rz

2007-04-18 20:17:38

From: Yakman
you can already do that, scar does allow a procedure/function to call itself, the SRL LoginPlayer uses it


sweet!
didn't know that.

@bullzeye
recursion is just being able to call the function from within itself until a certain condition is met. It's another kind of loop.

bullzeye95

2007-04-18 20:26:19

Ohh, ok. I already knew that.

omgh4x0rz

2007-04-18 20:34:15

From: bullzeye95
Recursion? What's that? Is that like the forward keyword?


ok :D

bullzeye95

2007-04-18 20:35:39

From: omgh4x0rz
ok :D


Don't be wise with me :mad:



:p