[slang-users] Include files like C #include does

John E. Davis davis at space.mit.edu
Tue Jul 18 20:50:08 EDT 2006


Jörg Sommer <joerg at alea.gnuu.de> wrote:
>If I want to move do_something() in a separate file I must make fun at
>least static.

I have thought a number of times about adding #include using the same
semantics as the CPP but it was never a high priority.

>implements("foo");
>static fun() {}
>() = evalfile("new_file", current_namespace());
>
>But then fun is accessable form anywhere.

It is accessable in the sense that it would have to be referenced
using foo->fun.

I suspect that there may be a larger problem you are trying to solve
and that using "#include" is just one mechanism to deal with it.  If
so, what is the larger problem?

Thanks,
--John




More information about the slang-users-l mailing list