Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Trig in Perl

by astaines (Curate)
on Sep 04, 2001 at 13:21 UTC ( #110000=note: print w/ replies, xml ) Need Help??


in reply to Trig in Perl

I used to see code like this a lot - this is more or less how many people wrote Fortran. There are *lots* of variables being passed to most of the subroutines - COMMON blocks. There are many many lines each doing some simple arithmetical manipulation. The main control of program flow seems to be through a couple of globals - whatfound and whatfound0.

I could never fix, understand or maintain code in this style, and I used to rewrite it as it was ultimately less painful.

It is faster to write code like this, for something that will only be done once. If it's going to be done twice, you should reconsider your basic design. Also if it doesn't currently work properly, as you suggest, a rewrite on more organised lines is probably the fastest way of fixing it.

-- Anthony Staines


Comment on Re: Trig in Perl
Re: Re: Trig in Perl
by John M. Dlugosz (Monsignor) on Sep 04, 2001 at 21:05 UTC
    Actually, those variables are not being passed! He seems to declare all his local vars as a parameter list, but @_ doesn't contain all that. It's usually empty, in fact.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://110000]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (14)
As of 2014-07-11 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (227 votes), past polls