string not aliased

Charles Brossollet chbrosso at free.fr
Wed Aug 15 09:24:19 PDT 2007


Hi all,

I'm a complete newbie to D, and tried the examples on the Wikipedia
page. the example 2 shows a main function like this:

int main(string[] args)   // string is a type alias for const(char)[]

But, I get this error on compile:
hello.d:3: Error: identifier 'string' is not defined
hello.d:3: Error: string is used as a type
hello.d:3: function hello.main parameters must be main() or
main(char[][] args)

Is the guy writing the example wrong? Or is it my environment? (gdc
0.23, on Mac OSX 10.4)

Thanks,

-- 
Charles


More information about the D.gnu mailing list