Re: Namelist Internal Read

gary.l.scott_at_lmco.com
Date: 03/29/05


Date: 28 Mar 2005 15:35:53 -0800


Walt Brainerd wrote:
> gary.l.scott@lmco.com wrote:
>
> > I've also never quite understood the need for the quirky &.../
syntax.
>
> It's the same reason as the inconsistent names for
> the bit intrinsics. I am not sure where namelist
> came from originally, but probably some vendor did
> it many years ago and some individual thought up
> what seemed like a neat scheme at the time.
>
> When it came up for standardization, "existing
> practice" was picked, rather than a nicer design.
>
> [Take note, ye who complain that the standards
> committee never adopts existing practice.]
>

I hate that. If there are blatantly obvious faults in the design, it
should not be adopted as-is. Vendors should define any extensions by
preceding the name with something that identifies it as an extension
(i.e. DEC_CRAY_POINTER, instead of just POINTER).

In reality, I'd just like a nice automatic text "parsing" procedure or
set of procedures that advances on namelist capabilities. I'm ok with
inputting file content through a separate read(s) and passing each
string to the parsing routine(s) preceded by a "template" of how I want
it to be parsed. The "component_name keyword=value, keyword=value,..."
part of the template is sort of obvious. It seems that you could
simply submit a derived type or several arrays to define the templates
and optional values for "substitutions" (need to define a syntax for
substitutions).

> --
> Walt Brainerd +1-877-355-6640 (voice & fax)
> The Fortran Company +1-520-760-1397 (outside USA)
> 6025 N. Wilmot Road walt@fortran.com
> Tucson, AZ 85750 USA http://www.fortran.com



Relevant Pages

  • Re: how to use parsing expressing grammar
    ... peg-parse is a Lisp macro in `peg.el'. ... Return (T STACK) if the match succeed and nil on failure. ... Here're examples illustrating the available rules and its syntax: ... ;; Parsing Expression is a follows: ...
    (comp.emacs)
  • Re: Long long int
    ... > more to the syntax of GAS or AT&T or whatever assembly. ... but that is simple absurdity. ... trained monkeys could have come up with a better template. ... algebraic notation is clearly a win over AT&T's What-The-Fuck notation. ...
    (comp.lang.c)
  • Re: Feedback wanted: new PHP template engine
    ... The last few months I've worked on making a template engine because ... at names) and is in many ways a simpler version of Smarty. ... I'm a really experienced Smarty user and i must say that i like your syntax more than the syntax Smarty uses. ... Ability to use objects in the template (not visible in the website or in the samples) ...
    (comp.lang.php)
  • Re: RfD: Enhanced local variable syntax
    ... leaving the actual name 'bufname' ... The first time I saw this syntax being used, ... both of which would make the parsing of locals considerably more complex. ... IMO standards have an obligation to choose best practice because ...
    (comp.lang.forth)
  • RE: Explicitly specify template param of template ctor
    ... What is the syntax for that? ... It would mean that template constructor functions ... compared to other member functions. ...
    (microsoft.public.vc.language)