Apache "mod_d" needs C to instantiate D interpreter?/D embedded in HTML

JFD jfd at nospam.com
Tue Nov 9 06:24:58 PST 2010


> Can't DMD already compile D code embedded in HTML:
> http://www.digitalmars.com/d/2.0/html.html ?

I tried the sample at the link, but got error.  I also tried it without the HTML
code inside.  Am I missing something?

$ dmd hello.html
Error: module hello html source files is deprecated hello.html

hello.html:

--------------
<html>
  <body>
    <code>
import std.stdio;

int main()
{
    writefln("Hello world");
    return 0;
}
    </code>
  </body>
</html>
--------------

-or-

--------------
import std.stdio;

int main()
{
    writefln("Hello world");
    return 0;
}
--------------


More information about the Digitalmars-d mailing list