digitalmars.D.learn - string not aliased
- chbrosso free.fr (Charles Brossollet) (14/14) Aug 15 2007 Hi all,
- Jason House (2/17) Aug 15 2007 The current gdc supports d version 1.x. The example you're doing, I bel...
- chbrosso free.fr (Charles Brossollet) (5/9) Aug 15 2007 OK, thanks. Does anyone knows when gdc will have D2.0?
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (7/13) Aug 15 2007 You can get "string" alias before D 2.0, though ? It came
- chbrosso free.fr (Charles Brossollet) (5/14) Aug 15 2007 Thanks, got svn gdc and it works. Just one thing: gdc --version still
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (8/10) Aug 15 2007 Indeed (that was true for GDC 0.23) It probably just hasn't been updated
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
Aug 15 2007
Charles Brossollet Wrote: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)The current gdc supports d version 1.x. The example you're doing, I believe, is for an alpha version of d (version 2.x). const(char) and various const/final/invariant stuff was added in 2.x (and is the reason for the version
Aug 15 2007
Jason House <jason.james.house gmail.com> wrote:The current gdc supports d version 1.x. The example you're doing, I believe, is for an alpha version of d (version 2.x). const(char) and various const/final/invariant stuff was added in 2.x (and is the reasonOK, thanks. Does anyone knows when gdc will have D2.0? Cheers, -- Charles
Aug 15 2007
Charles Brossollet wrote:You can get "string" alias before D 2.0, though ? It came in DMD 1.016 and the GDC svn is currently up to DMD 1.020... David Friedman hasn't published any E.T.A. on GDC 2.0 yet. Could be since we haven't reached GDC 1.0 yet, but anyway. :) --anders PS. http://sourceforge.net/svn/?group_id=154306The current gdc supports d version 1.x. The example you're doing, I believe, is for an alpha version of d (version 2.x). const(char) and various const/final/invariant stuff was added in 2.x (and is the reasonOK, thanks. Does anyone knows when gdc will have D2.0?
Aug 15 2007
Anders F Björklund <afb algonet.se> wrote:You can get "string" alias before D 2.0, though ? It came in DMD 1.016 and the GDC svn is currently up to DMD 1.020... David Friedman hasn't published any E.T.A. on GDC 2.0 yet. Could be since we haven't reached GDC 1.0 yet, but anyway. :) --anders PS. http://sourceforge.net/svn/?group_id=154306Thanks, got svn gdc and it works. Just one thing: gdc --version still says it is synced to DMC 1.007, which is a bit confusing... -- Charles
Aug 15 2007
Charles Brossollet wrote:Thanks, got svn gdc and it works. Just one thing: gdc --version still says it is synced to DMC 1.007, which is a bit confusing...Indeed (that was true for GDC 0.23) It probably just hasn't been updated yet, but should be before release (was wrong in a previous GDC version*) You can enter a bug for it in Bugzilla perhaps, unless it's updated soon Usually one can go off the ChangeLog, where it says "Merge DMD X.YYY"... --anders * At least I think this line in my build script was for a reason: perl -pe 's using dmd 0.149 using dmd 0.157 ' -i d/gdc-version; \
Aug 15 2007