Path: utzoo!attcan!uunet!ficc!peter
From: peter@ficc.uu.net (Peter da Silva)
Newsgroups: comp.lang.fortran
Subject: Re: i++, i+=1, i=i+1
Message-ID: <1531@ficc.uu.net>
Date: 18 Sep 88 23:07:58 GMT
References: <13583@mimsy.UUCP> <3697@lanl.gov>
Organization: SCADA
Lines: 30

In article <3697@lanl.gov>, jlg@lanl.gov (Jim Giles) writes:
> Exponentiation should be an in-line function (if the compiler is capable).

Agreed...

> The C language design makes this impossible (pow() is an external, therefore
> it must be possible for the user to substitute his own version at load time,
> therefore it cannot be expanded in-line at compile time).

This is not true. Just because something in 'C' has the form of a function
does not mean it is forced to be a function:

	getchar()
	min()/max() on many machines
	feof()
	isprint()

	All of these are macros. Many compilers implement strcpy() and
related functions inline just because this gives a speed advantage on
certain types of problems (such as dhrystone :->).

> A secondary objection is that
> exponentiation is a mathematical operation for which mathematicians
> and others have always had (and still expect) a shorthand syntax.

This syntax is, however, not the one Fortran uses. The mathematical syntax
for exponentiation is actually not displayable in ASCII text.
-- 
Peter da Silva  `-_-'  Ferranti International Controls Corporation.
"Have you hugged  U  your wolf today?"            peter@ficc.uu.net