Ask a Question related to PERL Beginners, Design and Development.
-
Thomas Browner #1
goto command
Does perl have a goto command. For example if you tell scrip to do
something and it returns a 1 then it should go to a block of code that
does something else.
Thanks,
Thomas Browner
Thomas Browner Guest
-
play next 5 frames and then GoTo
Hi there I have a button, which when clicked I want to continue playing the movie for an additional 5 frames, then go to the desired location. I... -
goto frame in another scene
Hi, What am I doing wrong this time? I try to load a movie into a placeholder and goto the first frame of the second scene. var layout =... -
LoadMovie vs goto Scene
Hi, all. I'm pretty new to Flash, using MX. Please help me understand loading movies as opposed to loading scenes. I understand that they are... -
goto net page [Please Help]
Sure, Lingo doesn't do that. The gotoNetPage() function only allows for two arguments, the URL and the target. Further, you'll probably find that... -
what is the command for goto marker?
just a quick one, I am very tired and have forgotten the command for goto marker on mouseUp goto "quit" -- or am i really asleep end I... -
Paul Kraus #2
RE: goto command
Sub dothissubroutine {
Do something
If return this
Else return this
}
My $result = &dothissubroutine
If $result = this
}elsif
This
}else{
This
}
Paul Kraus
-----------------------
PEL Supply Company
Network Administrator
> -----Original Message-----
> From: Thomas Browner [mailto:thomas.browner@digidyne.com]
> Sent: Thursday, January 29, 2004 12:46 PM
> To: [email]beginners@perl.org[/email]
> Subject: goto command
>
> Does perl have a goto command. For example if you tell scrip to do
> something and it returns a 1 then it should go to a block of code that
> does something else.
>
> Thanks,
> Thomas Browner
>
>
>
>
> --
> To unsubscribe, e-mail: [email]beginners-unsubscribe@perl.org[/email]
> For additional commands, e-mail: [email]beginners-help@perl.org[/email]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
Paul Kraus Guest
-
Rob Dixon #3
Re: goto command
Thomas Browner wrote:
Yes. But I've never seen a case where I think it should be used.>
> Does perl have a goto command. For example if you tell scrip to do
> something and it returns a 1 then it should go to a block of code that
> does something else.
Perl isn't a scripting language. (Although it can be, just like
it can be most things.)
If you want help, then please explain what you're trying to do. Then
we will explain how.
Rob
Rob Dixon Guest
-
Wolf Blaum #4
Re: goto command
For Quality purpouses, Thomas Browner 's mail on Thursday 29 January 2004
18:46 may have been monitored or recorded as:
Not talking about style (but in the TIMTOWTDI spirit):> Does perl have a goto command. For example if you tell scrip to do
> something and it returns a 1 then it should go to a block of code that
> does something else.
from perldoc -f goto:
goto LABEL
goto EXPR
goto &NAME
The "goto-LABEL" form finds the statement labeled
with LABEL and resumes execution there. It may
not be used to go into any construct that requires
initialization, such as a subroutine or a "fore-
ach" loop. It also can't be used to go into a
construct that is optimized away, or to get out of
a block or subroutine given to "sort". It can be
used to go almost anywhere else within the dynamic
scope, including out of subroutines, but it's usu-
ally better to use some other construct such as
"last" or "die". The author of Perl has never
felt the need to use this form of "goto" (in Perl,
that is--C is another matter). (The difference
being that C does not offer named loops combined
with loop control. Perl does, and this replaces
most structured uses of "goto" in other lan-
guages.)
hth, wolf
Wolf Blaum Guest
-
Noah Ganter #5
Re: goto command
The reason why the goto command is not generally used in perl (and other
languages) is that it does not force the developer to have a theoretical
framework for the program. It creates 'spagetti code' where a person working
on the code or trying to understand what the developer has done has to
follow a rabbit tunnel of goto directions. A direct alternative is using sub
procedures which not only perform the same goto like movement, but can use
parameters and return values as well.
"Thomas Browner" <thomas.browner@digidyne.com> wrote in message
news:002501c3e68f$cde84910$080a19ac@digidyne.com.. .> Does perl have a goto command. For example if you tell scrip to do
> something and it returns a 1 then it should go to a block of code that
> does something else.
>
> Thanks,
> Thomas Browner
>
>
>
Noah Ganter Guest



Reply With Quote

