(j3.2006) (j3.2005) Re: question on token replacement/concatenation
Tue Jan 23 15:24:25 EST 2007
On Tuesday 23 January 2007 02:22, Malcolm Cohen wrote:
> I believe that's essentially what we are aiming at,
> but at the lexical level not the textual level.
I got that part. The difference, while important, is not big enough from the
perspective of people writing real codes. Lexical tokens are simply not
high-level enough to capture the building blocks of syntax at the right
level. Again, **3 or %x may be a sequence of valid sequence of lexical
tokens, but as far as I am concerned, it might as well be a string. It means
nothing. 2**3 does, and a%x does, IMO.
> There is no argument from me that this would not be a nicety.
> Lots of other macro processors don't have such niceties though...
Lots of other processors allow strings to be used around actuals, and one can
pass commas in one way or another (see m4, for example). The processor I use
allows semicolons without any problems or special treatment (which is needed
In any case, who cares what others do? This is Fortran, not m4!
> Given the lack of support for "comma hackery"
Strangely, I consider what is there now to be hackery.
> in many other macro
> processors, I am obviously not alone in personally considering that
> particular frippery to be way down the list of desirable goodies.
Strangely how you only choose the things in other processors you like and
consider the rest frippery. EVERY macro processor I've seen has something
alike macro functions, i.e., less-than-complete-statement macro expansion. We
don't. I am sure you are alone in considering that a (minor) nicety.
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ LLNL
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816 Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
More information about the J3