|
Overview Extending DMDScript in D license Change Log DMDScript in C++ DMDScript in C++ License tech support Archives Acknowledgements ExamplesSieveMortgage Calculator |
DMDScriptWhat is DMDScript?DMDScript is Digital Mars' implementation of the ECMA 262 scripting language. Netscape's implementation is called JavaScript, Microsoft's implementation is called JScript. DMDScript is much faster than other implementations, which you can verify with the included benchmark.DMDScript is implemented in the D Programming Language. (A C++ implementation is also available.) Note: DMDScript is not the D Programming Language, nor is it Java. Here is the FAQ for ECMAScript. Key Benefits of DMDScript in D
Installing DMDScriptDownload DMDScript.Standalone Console Version of DMDScriptds with no arguments will compile and run the dscript file test.ds. With an argument, it will compile & run that file:ds sievewill compile and run sieve.ds. The .ds is the default extension. The console version has some additional builtin functions available:
Differences Between DMDScript (Digital Mars), Jscript (Microsoft) and Javascript (Netscape)goto StatementDMDScript implements the goto label; statement, like in C. goto is not part of the ECMA 262 v3 standard.assert() FunctionDMDScript implements the assert() function property of the Global Object. assert() throws a RuntimeError exception. If there is an argument to assert(), that argument is converted to a Boolean and a RuntimeError exception is thrown if the argument is false.__proto__ PropertyJavascript supports the __proto__ property. Neither ECMA nor Jscript nor DMDScript supports it.Conditional CompilationJScript's conditional compilation statements are not supported by DMDScript, Javascript, nor ECMA. |