Xref: utzoo comp.lang.fortran:745 comp.lang.c:10689
Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!ncar!boulder!tramp!swarbric
From: swarbric@tramp.Colorado.EDU (Frank Swarbrick)
Newsgroups: comp.lang.fortran,comp.lang.c
Subject: Re: Should I convert FORTRAN code to C?
Message-ID: <6552@sigi.Colorado.EDU>
Date: 9 Jun 88 06:45:19 GMT
References: <10655@agate.BERKELEY.EDU> <1857@hubcap.UUCP> <10681@agate.BERKELEY.EDU>
Sender: news@sigi.Colorado.EDU
Reply-To: swarbric@tramp.Colorado.EDU (Frank Swarbrick)
Organization: Beautiful Boulder By The Bay
Lines: 21

(I am really wondering if this belongs in comp.lang.fortran at all, but I am
not sure if Jerry Berkman reads comp.lang.c.  Sorry.)

Anyway, just because your outdated compiler doesn't compile x = +5 means only
that your compiler is outdated...  Or maybe even buggy, as it should not really
think it means x =+ 5.  And indeed, it doesn't, as it gave you a syntax error
instead of a warning saying you never initialized x.  Or maybe C used to not
accept this format; I don't know.

Anyway, I'm not disagreeing that it's good that FORTRAN can generate differnt
things for x = abs(x) depending on whether or not x is float, int, or whatever.
It's just in C the compiler does not know what a function looks like.  They
are just black boxes with a few restrictions.  C was made this way for a
reason, and I like it.  FORTRAN is different for a reason, and that's fine
too.

(Oh, by the way, if x is float or double use x = fabs(x);)

Frank Swarbrick (and, yes, the net.cat)           swarbric@tramp.Colorado.EDU
...!{ncar|nbires}!boulder!tramp!swarbric
"...This spells out freedom, it means nothing to me, as long as there's a PMRC"