--On 02 March 2004 14:32 +0000 John Reid <[log in to unmask]> wrote:
>>
>> I can't help but think the % symbol was used in Fortran just to be
>> different to C. I sure hope there was a better reason than that, because
>> now we all have to live with it.
>
> The reason was of possible syntactical ambiguities, given operators of
> the form .and., .or., etc. and the Fortran tradition of having no
> reserved words. There was a suggestion of requiring the programmer not to
> write anything ambiguous, but that did not fly.
>
> Personally, I like '%'. If I see it, I know exactly what is going on.
I too like %. Fortran has many comma separated lists. Think about reading
such a list if it was full of structure components using the period as the
selector! The % makes it very clear which is a component and which is a
list item.
The thing we got badly wrong in F90 was to make the order
structure%component rather then component%structure (read component "in"
structure) then we could have array-component%array-structure map sensibly
onto multi-dim-array with the subscript mapping obvious. Ah me! IF we could
have our time over!
>
> Cheers,
>
> John Reid.
--
Lawrie Schonfelder
Honorary Senior Fellow
University of Liverpool
1 Marine Park, West Kirby,
Wirral, UK, CH48 5HN
Phone: +44 (151) 625 6986
|