[ADMB Users] ADMB keywords
John Sibert
sibert at hawaii.edu
Wed Apr 21 12:28:24 PDT 2010
Yes, the catch keyword is annoying to us fish types, but Catch is OK.
(I'm wonder if writers of sports simulations have trouble with throw.)
Most of the "reserved AUTODIF keywords" are actually not keywords in the
formal sense. Most of them are public members of the derived class
fmm_control or its base class fmm. It might be possible to hide them
somehow, perhaps using a namespace or by making them private. Either of
these approaches might have some unpleasant side effects though. I don't
know where the ph variable comes from. In any case, they could be
mentioned in a manual at the very least.
John
Arni Magnusson wrote:
> Good point, Ian.
>
> Using ADMB should require only minimal C++ knowledge, so the ADMB
> manual should warn the user about reserved C++ keywords like:
>
> catch
>
> Closer to home, the ADMB manual should also warn about reserved
> AUTODIF keywords like:
>
> crit
> imax
> iprint
> ireturn
> maxfn
> ph
>
> I remember models crashing because I used variable names 'imax' and
> 'ph'. I'm not sure if this behavior can be improved with namespaces,
> but the reserved keywords are probably worth (1) mentioning in the
> manuals and (2) the upcoming FAQ, and possibly also (3) creating a
> formal issue in http://code.google.com/p/admb-project/issues/list and
> (4) highlighting as a warning in syntax-highlighting editors.
>
> Arni
>
> P.S. John, do you still have the AWK script you used to sift keywords
> from tpl2cpp.lex? Comparing that list to my keywords.txt is a useful
> comparison, revealing ADMB features that few users are taking
> advantage of. Any automated comparison of tpl2cpp.lex with C++ header
> files can also reveal discrepancies where features have become
> obsolete, or are not yet implemented. We can probably move that
> discussion to developers at admb-project.org.
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
>
--
John Sibert
Emeritus Researcher, SOEST
University of Hawaii at Manoa
Visit the ADMB project http://admb-project.org/
More information about the Users
mailing list