On 09/11/10 14:24, JFD wrote:
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;
}
--------------

Which version of dmd are you using? That code is for D 1.0/Phobos. You'll need to replace writefln with writeln for D2.

--
Robert
http://octarineparrot.com/

Reply via email to