Tip of the day!

Bill Campbell bill at celestial.com
Thu Nov 29 17:23:41 PST 2007


On Thu, Nov 29, 2007, John Esak wrote:
>The actual rule... would more probably be better stated as:
>
>
>Rule: An array must be DIMensioned on a line that comes numerically (and
>therefore physically) lower than the first time any of the arrays elements
>are referenced or assigned values.

I would generalize this for *ANY* programming languages.  It's always
better to declare variables before using them.

Forty+ years ago when I was writing FORTRAN programs, the first thing I
would do was declare all variables starting with [A-Z] to be logical, then
explictly declare things I wanted to use as REAL, INT, etc.  This didn't
keep FORTRAN from automagically making variables appear when I made typos,
but it would quickly get syntax errors as most operations on logical
variables were illegal.

Bill
--
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

There are three kinds of men. The ones that learn by reading. The few who
learn by observation.  The rest of them have to pee on the electric fence
for themselves. -- Will Rogers


More information about the Filepro-list mailing list