Drew McCormack wrote:
> Thanks for this idea, I hadn't thought of it. I might give the space a
> try.
>
> Drew
Not that I don't think it helps much (I don't), I follow a different
path. I normally never have more than one "%" for a variable.
My rule of thumb is, if I need the second "%", I need put the code
into another module, or at least an internal procedure to hide it.
In the past three years, I faithfully put PRIVATE in every derived
data types, such that no one can refer to the deeper "%" anymore.
It made my Fortran life much simpler.
I cann't say it would never hurt performance, but I never encountered
anything measurable. I believe simpler code structure would help
compiler to understand and to optimize the code. I also had several
occations earlier days that the compiler choked with "compiler error"
messages until I made the data structure thinner.
Jing
>
> On Mar 2, 2004, at 4:05 PM, Roderick W. Failing III wrote:
>
>> 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
[...]
--
** Any opinion expressed is my own and not that of NASA. **
________________________________ _-__-_-_ _-___--- _____________________
Jing Guo, [log in to unmask], (301)614-6172(o), (301)614-6297(fx)
Global Modeling and Assimilation Office, Code 900.3, NASA/GSFC
Greenbelt, MD 20771
|