Scripting again.
so
so at so.do
Thu Dec 9 15:30:55 PST 2010
> This should be a bit more clear (untested code).
>
> --scrip1.d
> import std.stdio;
> writefln(i);
> ----
>
> --main.d
> import std.file;
> import std.script;
>
> void main(){
> Script s = new Script(cast(ubyte[]) read("script1.d"));
> assert(!s.validate);
> int i = 1;
> assert(s.validate);
> s.compile();
> s.execute(); // output 1
> }
> ----
Oh, D doesn't have a scripting module as far as i know.
Sorry i thought you were implying something, knowing the the topic is
touchy for some people that has no idea how serious is this tiny issue.
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list