R0b0t1
08-10-2007, 08:30 AM
I put this in the expert section because... Experts would be the only people who cared?
Well, if you are looking at this message in your browser, then you expect an explanation of what "goto" is, right? Well, in my words, it is just a command that makes it skip over a whole part of a script, and execute the part below it.
And, what the Delphi people say it's:
Forces a jump to a label, regardless of nesting
W7F r0bot1z0r! What does that mean?
If you had a "It" procedure/thing that had tons of loops in it, you could use goto instead of tons of Break/Exits. So then, how does it work?
First you must declare a label like so:
program TestGoto;
label
TeHLaBeLzOr;
Then, you need to have something to break out of or skip:
program TestGoto;
{.Include SRL/SRL.scar}
Var YouAreGay: Boolean;
Var YouAreTehGay: String;
label
TeHLaBeLzOr;
begin
YouAreTehGay:= ReadLn('Are you gay?');
YouAreGay:= StrToBool(YouAreTehGay);
WriteLn('Testing GoTo command');
Wait(1000);
If not (YouAreGay) Then
goto TeHLaBeLzOr;
WriteLn('If you are straight (like you should be) you will not see this message');
TeHLaBeLzOr:
If not (YouAreGay) Then
WriteLn('Grats! You are NOT gay!');
If (YouAreGay) Then
WriteLn('EWWWWW! SICKO!');
end.
Well, there are more creative uses, like... Doing those errors to mess up leechers?
Well, just be warned that it will still execute the code below the label, unless you make it so it cant somehow.
~r0b0t1 who works in the Department Of Useless Information (DOUI)
Well, if you are looking at this message in your browser, then you expect an explanation of what "goto" is, right? Well, in my words, it is just a command that makes it skip over a whole part of a script, and execute the part below it.
And, what the Delphi people say it's:
Forces a jump to a label, regardless of nesting
W7F r0bot1z0r! What does that mean?
If you had a "It" procedure/thing that had tons of loops in it, you could use goto instead of tons of Break/Exits. So then, how does it work?
First you must declare a label like so:
program TestGoto;
label
TeHLaBeLzOr;
Then, you need to have something to break out of or skip:
program TestGoto;
{.Include SRL/SRL.scar}
Var YouAreGay: Boolean;
Var YouAreTehGay: String;
label
TeHLaBeLzOr;
begin
YouAreTehGay:= ReadLn('Are you gay?');
YouAreGay:= StrToBool(YouAreTehGay);
WriteLn('Testing GoTo command');
Wait(1000);
If not (YouAreGay) Then
goto TeHLaBeLzOr;
WriteLn('If you are straight (like you should be) you will not see this message');
TeHLaBeLzOr:
If not (YouAreGay) Then
WriteLn('Grats! You are NOT gay!');
If (YouAreGay) Then
WriteLn('EWWWWW! SICKO!');
end.
Well, there are more creative uses, like... Doing those errors to mess up leechers?
Well, just be warned that it will still execute the code below the label, unless you make it so it cant somehow.
~r0b0t1 who works in the Department Of Useless Information (DOUI)