Re: speaking of control structures...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 07 May 2009 09:33:00 -0400, fsb@xxxxxxxxxx (Tom Worster) wrote:

>On 5/6/09 9:31 PM, "Clancy" <clancy_1@xxxxxxxxxxxx> wrote:
>
>> I can understand your reluctance to disregard your mother's advice, but
>> unfortunately she
>> had been brainwashed to accept the dogma of the day.
>
>actually, i don't believe so. she did numerical work so she continued using
>fortran and therefore gotos for the rest of her life. i think she just
>didn't like goto. moreover, she was never dogmatic on any topic, it wasn't
>in her nature.
>
>anyway, how do you know how she came by her opinions?
>

I did not say your mother was dogmatic; but clearly she had accepted the dogma of the day,
as there is no rational reason to avoid the goto. Assuredly the goto can be misused, but
this attitude is rather like that of my wife, who is extremely reluctant to use my sharp
kitchen knives 'because they are dangerous', and insists on using her own worn out
implements that are barely suitable for buttering toast. I know my knives are dangerous --
the odd bit of finger occasionally sneaks into the dinner -- but they are essential to do
the job properly, and in my opinion the goto comes in the same category.

Another very useful feature of my original program was that it had an error handler at the
end, and if I detected an error, anywhere in the program, I simply said 'goto error'. This
was an assigned goto, so that I could set up error handlers for particular circumstances
if I wished. This was no longer possible in more modern versions of Fortran, and I had to
set up, and keep track of, a complicated system of error flags to achieve the same result.
Reading this discussion, I was amused to realise that the modern system of exceptions, and
exception handlers, was designed to achieve the same end.

The operating system was extremely unfriendly, as if it detected an error it simply
terminated the job with an inscrutable message. As I only got three runs a week anyway I
went to great lengths to avoid this. I even developed my own plotter driver, as the system
one would terminate the plot if any command went outside the specified working area. This
was usually the result of a typo, and would come good on the next instruction, so when my
driver detected that the pen had reached the edge of the working area, it would raise it,
and keep track of the position until the pen came back into the working area, whereupon it
would lower it and continue plotting. 

This was relatively simple, as the plotter only had three commands; pen up, pen down, and
step one step in any of the eight directions of the compass. On the other hand it meant I
had to develop my own font set and electronic symbols.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux