Scripting again.

%u e at ee.com
Thu Dec 9 15:41:08 PST 2010


== Quote from so (so at so.do)'s article
> > 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.

I was kind of implying the script module existed, but I'm not really touchy about
that ;P


More information about the Digitalmars-d mailing list