home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mdcbbs!swordfish!alanb
- Newsgroups: gnu.misc.discuss
- Subject: Re: Fortran Is Not Dead, Unfortunately
- Message-ID: <ALANB.92Nov17115348@catalina.sdl.mdcbbs.com>
- From: alanb@sdl.mdcbbs.com (Alan Braggins)
- Date: 17 Nov 92 10:53:47 GMT
- References: <FRIEDMAN.92Oct16200656@nutrimat.gnu.ai.mit.edu><STDKAP1.92Oct17132457@oedipus
- .spc.uchicago.edu><FRIEDMAN.92Oct18171824@nutrimat.gnu.ai.mit.edu><BwCBBn.8Dq@
- mtholyoke.edu> <HARDS4.92Oct19105906@evans.ee.adfa.oz.au><1992Oct19.212947.20744@maths.tcd.ie>
- Organization: Shape Data (Division of EDS), Cambridge UK
- Nntp-Posting-Host: 134.244.153.110
- In-reply-to: tim@maths.tcd.ie's message of Mon, 19 Oct 1992 21:29:47 GMT
- Lines: 37
-
- >>>>> On Mon, 19 Oct 1992 21:29:47 GMT, tim@maths.tcd.ie (Timothy Murphy) said:
-
- > hards4@evans.ee.adfa.oz.au (Brad Hards) writes:
-
- >> P.S.: At MHC they're teaching intro-CompSci and data structures in
- >> ANSI C now... but I just recently discovered that at least one
- >> instructor is busily trying to turn C into Pascal, by doing such
- >> horrible things as using "const" to declare constants instead of using
- >> the pre-processor. Ugh!
-
- > Are you sure this was in imitation of Pascal?
- > There are obvious advantages in using const --
- > for one thing, the compiler can check the type.
-
- And you can have structure constants, and they show up in the debugger,
- and you can pass the integral ones to Fortran by address (see topic title).
-
- But they aren't compile time constants, so can't be used for dimensioning
- arrays, or have constant folding done. Enums can, and can also be typechecked.
-
- I'd like to see
-
- extern const int foo = 5;
-
- be legal, meaning "The space for foo is allocated elsewhere, but it is safe
- to assume it will be 5". Having a definition which is not initialised to
- the same value would be an error.
-
- > Come on, admit it, the instructor was right ...
- Depends whether he taught which should be used where and why, or just presented
- a rule to be followed blindly...
-
- --
- Alan Braggins, alanb@sdl.mdcbbs.com, abraggins@cix.compulink.co.uk
- Shape Data - A division of EDS-Scicon Limited. Cambridge, UK +44-223-316673
- "Any technology distinguishable from magic is insufficiently advanced."
- "My employer does not necessarily share my views - but I'm working on it."
-