🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5031

Forced variable declaration

#5031
From: Carol Springs
Date: Fri, 22 Jan 1988 16:20
25 lines
1970 bytes
In article <2666@mmintl.UUCP> franka@mmintl.UUCP (Frank Adams) writes:

>What I really hate is having the compiler *not* yell at me for mispelling
>one of my variable names, and having to spend (sometimes) hours to find the
>bug.  The overlooked declaration can be fixed in a few minutes.  It takes a
>*lot* of those to make up for one six hour debugging effort.

I agree.  That's why it's a good idea for FORTRAN programmers  to include 
the line IMPLICIT LOGICAL (A-Z) or IMPLICIT CHARACTER (A-Z) in each main  
program and subprogram.  Even better, many compilers now make an 
IMPLICIT NONE available.  

I realize that the thought of being forced to declare one's variables is
odious to most "traditional" FORTRAN programmers.  I still remember students  
from my T.A. days who would look at me as though I were off my rocker for  
telling them to use IMPLICIT LOGICAL and declare all their variables.  These
kids' major, unsolvable problems always seemed to stem from some overlooked
misspelling.  Of course, in the professional world, such things never 
happen.  ;-)  

-- 
      Carol Springs           "Programmers are allowed five extra years." 
Data Resources/McGraw-Hill   {rutgers!ll-xn, ames!ll-xn, mit-eddie!ll-xn, 
    24 Hartwell Avenue           husc6!harvard, gatech!harvard,  
   Lexington, MA  02173          linus!axiom, necntc}     !drilex!carols  
Technical Details
Message-ID: <445@drilex.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!ima!necntc!drilex!carols
References: <enea.2553> <1520@ogcvax.UUCP> <enea.2570> <1522@ogcvax.UUCP> <2582@enea.se> <3315@ihlpf.ATT.COM> <17327@topaz.rutgers.edu> <6121@cisunx.UUCP> <2666@mmintl.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!ima!necntc!drilex!carols
From: carols@drilex.UUCP (Carol Springs)
Newsgroups: comp.lang.misc,comp.lang.fortran
Subject: Forced variable declaration
Message-ID: <445@drilex.UUCP>
Date: 22 Jan 88 16:20:28 GMT
References: <enea.2553> <1520@ogcvax.UUCP> <enea.2570> <1522@ogcvax.UUCP> <2582@enea.se> <3315@ihlpf.ATT.COM> <17327@topaz.rutgers.edu> <6121@cisunx.UUCP> <2666@mmintl.UUCP>
Reply-To: carols@drilex.UUCP (Carol Springs)
Followup-To: comp.lang.fortran
Organization: Data Resources/McGraw-Hill, Lexington, MA
Lines: 25