Really, it seems that there is no way out of this one. The parser must be complicated enough, what with the lack of reserved words. If the period can be used also to specify components, then will

 

.not..and.

 

mean that you meant to access a component of the  object called “not” and forgot the intermediate structure between “not” and “and”? I expect it might still be possible to disambiguate (yikes! what a word) the code, but at the cost of missing fiendishly difficult to find syntax errors, and making the language even more unforgiving to beginners.

 

Really, perhaps the best thing to do would be make “no reserved words” an obsolescent feature? I never understood why Fortran did that. I can understand keeping it in Fortran 9x to provide an upgrade path, but why allow this forever?

 

[Ducks to avoid the flames. J]

 

Alvaro Fernández

 

 


From: Fortran 90 List [mailto:[log in to unmask]] On Behalf Of Alberto Águeda Maté
Sent: Tuesday, March 02, 2004 9:20 AM
To: [log in to unmask]
Subject: Re: Symbols

 

Definitely, stop coding using "Times New Roman"... effectively, it does not look nice... in fixed-step fonts, it looks much better...

 

Such a meaningless discussion...

 

 

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.