Since we seem to be voting on this, my vote goes with the original
poster. I do not like the "%" symbol because it is too dense and makes
code very hard to read, especially if all caps is used. Since spaces
are irrelevant I add a space after the "%" to make it easier to see the
final component, which is usually the component of the most interest.
See the examples below.
allocate(g% prober(cp% nprobs))
allocate(g%prober(cp%nprobs))
g% prober(i) = curprobe% radius
g%prober(i) = curprobe%radius
I also agree with reversing the order. It would have had the same
effect and the delimiter would not matter.
Rod Failing
-----Original Message-----
From: Fortran 90 List [mailto:[log in to unmask]] On Behalf
Of J.L.Schonfelder
Sent: Tuesday, March 02, 2004 09:38
To: [log in to unmask]
Subject: Re: Symbols
--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
This email message and any attachment(s) are for the sole use of the intended recipient(s)
and may contain proprietary and/or confidenntial information which may be privileged or
otherwise protected from disclosure.
Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the
intended recipient(s), please contact the sender by reply email and destroy the original
message and any copies of the message as well as any attachment(s) to the original
message.
|