digitalmars.D - helloworld example doesn't work
- kellywilson nowhere.com (16/16) May 09 2006 Hey everyone,
- Tony (9/29) May 09 2006 Oops. Nothing to do with the compiler version.
- Tony (10/30) May 09 2006 I'd like to retract my last post :)
- Derek Parnell (11/34) May 09 2006 This code is buggy. I added corrected and expanded code at the wikibooks
- kellywilson nowhere.com (6/40) May 09 2006 Right. I knew I saw that code with a lot of comments somewhere...but the...
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
May 09 2006
<kellywilson nowhere.com> wrote in message news:e3ra8h$1gds$1 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 WilsonOops. Nothing to do with the compiler version. The following line: specs argspecs() Needs to be changed to: specs argspecs(char[][] args) Tony Melbourne, Australia
May 09 2006
<kellywilson nowhere.com> wrote in message news:e3ra8h$1gds$1 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 WilsonI'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
May 09 2006
On Tue, 9 May 2006 23:57:05 +0000 (UTC), kellywilson nowhere.com wrote: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 WilsonThis code is buggy. I added corrected and expanded code at the wikibooks site. http://en.wikibooks.org/wiki/Programming:D/First_Program_Examples#Example_3 -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 10/05/2006 1:50:09 PM
May 09 2006
Right. I knew I saw that code with a lot of comments somewhere...but the first example seen on digitalmars/d should be bug free, if possible. So I guess Tony, or someone, should fix it if possible. Thanks, Kelly Wilson In article <1r9mj4arbawc1$.1qxauyo3805qi.dlg 40tude.net>, Derek Parnell says...On Tue, 9 May 2006 23:57:05 +0000 (UTC), kellywilson nowhere.com wrote: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 WilsonThis code is buggy. I added corrected and expanded code at the wikibooks site. http://en.wikibooks.org/wiki/Programming:D/First_Program_Examples#Example_3 -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 10/05/2006 1:50:09 PM
May 09 2006