[ADMB Users] ADMB keywords

Arni Magnusson arnima at hafro.is
Tue Apr 20 11:36:06 PDT 2010


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.



More information about the Users mailing list