helloworld example doesn't work

Tony ignorethis at nowhere.com
Tue May 9 17:28:53 PDT 2006


<kellywilson at nowhere.com> wrote in message 
news:e3ra8h$1gds$1 at digitaldaemon.com...
> Hey everyone,
>
> I just tried out the helloworld example posted at
> www.digitalmars.com/d/index.html
>
> and I get this error (with dmd 0.149):
>
> /hello.d(49): function hello.main.argspecs () does not match argument 
> types
> (char[][])
> /hello.d(49): Error: expected 0 arguments, not 1
>
> /hello.d(49): function hello.main.argspecs () does not match argument 
> types
> (char[][])
> /hello.d(49): Error: expected 0 arguments, not 1
>
> I can fix things so that they appear to run correctly (except the 
> "argc=..."
> part at the end of main(), of course) by just commenting out line 50.
>
> Any ideas as to why it is dying with this version of the compiler? Just 
> too old?
> Or is it dying for others?
>
> Thanks,
> Kelly Wilson

I'd like to retract my last post :)

Since the example is supposed to demonstrate an inner function referencing 
outer variables, it would be better to change the line:

argspecs(args).count, argspecs(args).allocated);

to:

argspecs().count, argspecs().allocated);

Tony
Melbourne, Australia





More information about the Digitalmars-d mailing list