FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » The goto statement in PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: The goto statement in PHP [message #185740 is a reply to message #185739] Mon, 05 May 2014 15:33 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 5/5/2014 11:08 AM, richard wrote:
> On Mon, 05 May 2014 10:27:36 -0400, Jerry Stuckle wrote:
>
>> On 5/5/2014 9:50 AM, richard wrote:
>>> In Liberty BASIC (LB) we also have branched goto labels.
>>> As I was reading the goto manual on php.net I see where they make no
>>> distinction between a label and a variable.
>>> In LB it is simple.
>>> a=0 is a distinct variable.
>>> [a] is a distinct label.
>>>
>>> When goto [a] is encountered, it matters not what or where the variable "a"
>>> is.
>>>
>>> I'm just suggesting that they need a means to distinguish the pair.
>>>
>>
>> Better yet - don't use goto. I never have needed it.
>
> Yeah I know. I've heard it a zillion times before.
> "Any language that uses a 'goto' is one that is screwed up".
> But hey, there are times when the evil is required.
>
> I recall a scene from a movie.
> Dozens of federal agents armed to the teeth break into a hacker's
> residence.
> He's busy trying to erase all of his hard work so they have no evidence.
> "No you got it wrong boy. We're not here to bust you. This time. We're to
> hire you!".
> Purely for the drama of course.
>

Nope, goto is NEVER "required". Sometimes it's handy, but never required.

Even in almost 30 years of C and C++ programming I have never *HAD* to
use goto. Proper code structure eliminates the need (and reduces the
number of potential errors).

Now that's not to say I've *NEVER* used goto. But the number of times
I've used it can be counted on one hand. And then it's because I'm
doing device drivers or similar, where size and speed are important
(still true on some ARM devices).

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: part two same issue - unwanted empty values in array
Next Topic: richard
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 02:07:56 GMT 2024

Total time taken to generate the page: 0.04612 seconds