string not aliased
Carlos Santander
csantander619 at gmail.com
Wed Aug 15 09:53:54 PDT 2007
Charles Brossollet escribió:
> 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,
>
string was added in DMD 1.016, which corresponds to GDC SVN revision 134. GDC
0.23 is only up to DMD 1.007, so get the latest GDC. You can find instructions
in http://dsource.org/projects/tango/wiki/UnixInstallGdc, down to the "GDC
Installation from source" section.
--
Carlos Santander Bernal
More information about the Digitalmars-d-learn
mailing list