Andrei Alexandrescu <seewebsiteforem...@erdani.org> писал(а) в своём
письме Thu, 11 Nov 2010 21:12:33 +0600:
On 11/11/10 5:50 AM, Alexander Malakhov wrote:
Maybe it would be better to just make rdmd to surround source code with:
//----- rdmd generated text BEGIN
public import std.stdio, ...
void main( string[] args ){
//----- rdmd generated text END
// programmer's code
}
in cases when rdmd detects there is no main()
rdmd already does that with --eval and --loop.
http://www.digitalmars.com/d/2.0/rdmd.html
Andrei
I was unable to pass file to --eval, is this possible ?
rdmd --eval=script.d
(16): Error: undefined identifier script
also while I'm here. This works: > rdmd
--eval=writeln("");writeln("");writeln("");
and this don't:
rdmd --eval=writeln("hello")
(16): Error: undefined identifier hello
btw, does --eval make "import std.all" or some set of modules ?
--
Alexander