string not aliased
Anders F Björklund
afb at algonet.se
Wed Aug 15 09:29:38 PDT 2007
Charles Brossollet wrote:
> 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)
The example is using D 2.0, while GDC supports D 1.0 at the moment.
(the language was split into two different versions a while ago...)
int main(char[][] args)
--anders
More information about the Digitalmars-d-learn
mailing list