[ADMB Users] Include source

Jeff Laake jefflaake at gmail.com
Fri Feb 22 11:03:54 PST 2013

Thanks Jim, Mollie and Steve. I was actually thinking of something a little
more flexible than functions or including cpp code. What I was thinking was
something like source("filename.tpl") such that it could be a whole
function, part of a function or even parts of data or parameter or other
sections. Sounds like that isn't currently possible. I'll just create
something in R that pre-processes the file to allow that structure.

Thanks for all the quick responses.

regards --jeff

On Fri, Feb 22, 2013 at 10:58 AM, Mollie Brooks <mbrooks at ufl.edu> wrote:

> Hi Jeff,
> It is possible to include code in the GLOBALS_SECTION
> Here's an example
>         #include "/Users/molliebrooks/Desktop/Community Dynamics
> Postdoc/ADMB/kronecker.cpp"
> Hope that answers your question.
> cheers,
> Mollie
> Mollie Brooks
> Postdoctoral Researcher, Ponciano Lab
> Biology Department, University of Florida
> http://people.biology.ufl.edu/mbrooks
> On 22 Feb 2013, at 1:24 PM, Jeff Laake wrote:
> > Is there any way to include source into a TPL file. I know of #include<>
> for c++ code but am I overlooking some syntax in the documentation.  I
> tried that with a .tpl and it didn't work. What I want to do is to have a
> common part of a TPL in its own file say common.tpl and then just have an
> include <common.tpl>  in the TPL files that use it.  If not currently
> available, I think this would make a nice addition to avoid replicating
> code.
> >
> > I could probably do it in R using R2admb but before I go down that
> route, I thought I'd ask.
> >
> > regards --jeff
> > _______________________________________________
> > Users mailing list
> > Users at admb-project.org
> > http://lists.admb-project.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20130222/4890f288/attachment.html>

More information about the Users mailing list