Why does this work?

2014-06-23 Thread h_zet via Digitalmars-d-learn
error function declaration without return type) Why does this work? Or it is a bug?

Why does this work?

2009-01-24 Thread Mike L.
I saved and compiled the code given as getenv.d on the page http://www.digitalmars.com/d/archives/digitalmars/D/learn/623.html but I'm not entirely sure why it works. The reasons that I don't understand it are: 1. GetEnvironmentStringsA() and the other functions aren't mentioned in std/c/window

Re: Why does this work?

2014-06-23 Thread VonGrass via Digitalmars-d-learn
cured. DMD version is DMD64 v2.065.(ldc2 exited with error function declaration without return type) Why does this work? Or it is a bug? Looks grammaticallyu correct: R type is guessed/infered from the parameter

Re: Why does this work?

2014-06-23 Thread hane via Digitalmars-d-learn
cured. DMD version is DMD64 v2.065.(ldc2 exited with error function declaration without return type) Why does this work? Or it is a bug? You declared a variable template named "tuple" (with unused type parameters a, b) on that line. http://dlang.org/template.html#variable-template

Re: Why does this work?

2014-06-23 Thread Mason McGill via Digitalmars-d-learn
cured. DMD version is DMD64 v2.065.(ldc2 exited with error function declaration without return type) Why does this work? Or it is a bug? Strange behavior, indeed. It took me a minute, but I think I know what's going on, and I'm pretty sure it's a bug. D recently introduce

Re: Why does this work?

2014-06-23 Thread Mason McGill via Digitalmars-d-learn
On Monday, 23 June 2014 at 09:29:15 UTC, Mason McGill wrote: Strange behavior, indeed. It took me a minute, but I think I know what's going on, and I'm pretty sure it's a bug. D recently introduced a short syntax for function-like templates: enum a(b) = "some_value"; It looks like this also

Re: Why does this work?

2014-06-23 Thread bearophile via Digitalmars-d-learn
h_zet: Why does this work? Or it is a bug? When you play a little with this code it's easy to see _error_ that should not appear. So there's surely something worth reporting as bug, but I don't yet know what. Bye, bearophile

Re: Why does this work?

2014-06-23 Thread h_zet via Digitalmars-d-learn
left value but when I compiled this, no error occured. DMD version is DMD64 v2.065.(ldc2 exited with error function declaration without return type) Why does this work? Or it is a bug? You declared a variable template named "tuple" (with unused type parameters a, b) on t

Re: Why does this work?

2014-06-24 Thread bearophile via Digitalmars-d-learn
h_zet: Problem solved, Thank you so much! I don't think it's solved. There are probably bugs worth reporting here. Bye, bearophile

Re: Why does this work?

2014-06-24 Thread bearophile via Digitalmars-d-learn
I don't think it's solved. There are probably bugs worth reporting here. I have not found them, sorry for the noise. Bye, bearophile

Re: Why does this work?

2014-06-24 Thread Meta via Digitalmars-d-learn
On Tuesday, 24 June 2014 at 10:11:05 UTC, bearophile wrote: I don't think it's solved. There are probably bugs worth reporting here. I have not found them, sorry for the noise. Bye, bearophile This looks really bad. I thought we weren't going to allow variable templates, just enums and alia

Re: Why does this work?

2009-01-24 Thread Denis Koroskin
Mike L. Wrote: > I saved and compiled the code given as getenv.d on the page > http://www.digitalmars.com/d/archives/digitalmars/D/learn/623.html but I'm > not entirely sure why it works. > > The reasons that I don't understand it are: > 1. GetEnvironmentStringsA() and the other functions aren'

Re: Why does this work?

2009-01-24 Thread Mike L.
Denis Koroskin Wrote: > Mike L. Wrote: > > > I saved and compiled the code given as getenv.d on the page > > http://www.digitalmars.com/d/archives/digitalmars/D/learn/623.html but I'm > > not entirely sure why it works. > > > > The reasons that I don't understand it are: > > 1. GetEnvironmentS

Re: Why does this work?

2009-01-24 Thread Jarrett Billingsley
On Sat, Jan 24, 2009 at 8:38 PM, Mike L. wrote: > > Thanks for your response. Could you tell me what the compiler is linking to > that contains GetEnvironmentStringsA() (and others) and how the compiler > knows to do this? > It's in either user32 or kernel32, and I think DMD always links agains