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

Home » Imported messages » comp.lang.php » terminate a PHP script
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: terminate a PHP script [message #172631 is a reply to message #172575] Tue, 22 February 2011 17:04 Go to previous messageGo to previous message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma:
Senior Member
In article <ijv2h3$3tc$1(at)news(dot)albasani(dot)net>,
The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:

> Tim Streater wrote:
>> In article <ijub3f$cqn$2(at)news(dot)eternal-september(dot)org>,
>> sheldonlg <sheldonlg(at)thevillages(dot)net> wrote:
>>
>>> On 21/2/2011 1:04 PM, Tim Streater wrote:
>>>> In article <iju7sd$9fc$1(at)news(dot)eternal-september(dot)org>,
>>>> Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote:
>>>>
>>>> > goto is NEVER needed, and SELDOM a good thing to use. It completely
>>>> > violates structured programming practices and causes more problems
>>>> > than it solves.
>>>>
>>>> By and large this is true. With one exception, I haven't used one since
>>>> 1978 when I stopped using FORTRAN.
>>>>
>>>> The exception was when doing some Pascal under RSX-11M. There was no
>>>> "return" statement, so I had to fake one up by putting a 999: label at
>>>> the end of any procedure where I wanted an early return, and then
>>> goto 999.
>>>
>>> Again, why not if-then-else?
>>
>> You mean, as in SESE?
>>
>> Because of the incredible convolution and depth of nested if/then/else
>> you can get to. If I have (as it might be) a function that's scanning a
>> string looking for and obtaining options and their values for some
>> command previously scanned off the string, and I detect an error, I want
>> to set an error code and exit right there. I don't want any subsequent
>> maintainer to have to intuit that, in fact, from this point on nested
>> 15-deep in else clauses, no more code is executed for that path through
>> the function.
>>
>> That way I rarely get more than 3-deep in if/then/else. To me, it's all
>> about readbility.
>>
> +100
>
> Its easy to recognise people who actually write code, as opposed to
> those who tell other people how they ought to write it.
>
> Its probably easier these days with editing tools that collapse things
> with curly braces round them..but those tools wouldn't need to exist if
> people learnt to code properly, as opposed to simply in some
> academically defined 'good ' way.

Yar fine I have an editor that does this collapsing but I never use it.
Partly because my closing brace is always underneath the opening one.

> When I started in C the first thing I wrote was a program that could
> print onto a dot matrix in condensed characters, simply so the nesting
> did not run off the right hand side of the paper: with the editors then,
> a paper printout was a lot easier to follow than onscreen.

I just make the window wider :-) Even today I still see people doing
white-text-on-black in a 25x80 window. Fuck knows why.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[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
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
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
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
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: Extralight browser-webserver communication via cookies (+)
Next Topic: Storing multiple character set types (or a representation of em) in a table column
Goto Forum:
  

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

Current Time: Fri Jul 05 18:51:10 GMT 2024

Total time taken to generate the page: 0.04143 seconds