Hi,
I'm a new D learner but I'm wondering which version of D is suitable for me.
v1, or v2?
When D 2 is out, it seems to be apparent that I should go directly to v2.
But my intention of using D is to create small desktop application for windows,
which needs GUI library of cource. I checked out
Le Fri, 21 Nov 2008 00:34:03 +0100, Denis Koroskin <[EMAIL PROTECTED]> a
écrit:
union ColorProxy {
uint color;
struct {
ubyte red;
ubyte green;
ubyte blue;
ubyte alpha;
}
}
ColorProxy proxy;
proxy.color = ColorValues.Aqua;
return Color(proxy.red, proxy.gre
"Ary Borenszweig" wrote
> Christopher Wright escribió:
>> Steven Schveighoffer wrote:
>>> "Christopher Wright" wrote
Steven Schveighoffer wrote:
> Not exactly ;) The wrapped type is not equivalent to inheritance.
No, exactly:
class Wrapper(T) : T
{
T opDot() {}
>>
Christopher Wright escribió:
Steven Schveighoffer wrote:
"Christopher Wright" wrote
Steven Schveighoffer wrote:
Not exactly ;) The wrapped type is not equivalent to inheritance.
No, exactly:
class Wrapper(T) : T
{
T opDot() {}
}
class Wrapper(T) : T
{
}
works just as good ;)
-Steve
T
struct A
{
char[] sval = "test";
bool bval = true;
int ival = 3;
double dval = 4f/3;
real rval = 8f/3;
}
should likely be:
struct A
{
char[] sval = "test";
bool bval = true;
int ival = 3;
double dval = 4f/3f; // 4/3f should work to
real rval = 8f/3f;
}
Bill Baxter escribió:
On Fri, Nov 21, 2008 at 10:59 AM, Ary Borenszweig <[EMAIL PROTECTED]> wrote:
If you don't want to move your files and keep them where they are, create a
new D project and in the first page of the wizard select "from existing
source" and type or select the folder where your
You mean something like this ?
struct fruits
{
Banana banana();
Apple apple();
}
I now use foreach(int i, Fruit fruit; fruits) a lot.
How do I iterate over all elements when I use the above?
> Saaa Wrote:
>
>> >> this wrong:
>> >> fruits[BANANA].peel();
>> >
>> > why not using struct?
>
Saaa Wrote:
> >> this wrong:
> >> fruits[BANANA].peel();
> >
> > why not using struct?
>
> How do you mean?
> What should be a struct?
>
typed array.