On Sun, 11 Jan 2009 10:08:47 +0300, Tim M wrote:
On Sun, 11 Jan 2009 19:56:55 +1300, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 11 Jan 2009 06:04:01 +0300, Tim M wrote:
On Sun, 11 Jan 2009 15:59:26 +1300, Tim M wrote:
On Sun, 11 Jan 2009 15:50:54 +1300, Daniel Keep
wrote:
On Sun, 11 Jan 2009 19:56:55 +1300, Denis Koroskin <2kor...@gmail.com>
wrote:
On Sun, 11 Jan 2009 06:04:01 +0300, Tim M wrote:
On Sun, 11 Jan 2009 15:59:26 +1300, Tim M wrote:
On Sun, 11 Jan 2009 15:50:54 +1300, Daniel Keep
wrote:
Tim M wrote:
Why is this an error. Dmd wants to m
On Sun, 11 Jan 2009 06:04:01 +0300, Tim M wrote:
On Sun, 11 Jan 2009 15:59:26 +1300, Tim M wrote:
On Sun, 11 Jan 2009 15:50:54 +1300, Daniel Keep
wrote:
Tim M wrote:
Why is this an error. Dmd wants to make sure that I declare a new
variable in the foreach statement and not use an e
On Sun, Jan 11, 2009 at 12:15 PM, Tim M wrote:
> On Sun, 11 Jan 2009 16:10:39 +1300, Bill Baxter wrote:
>
>> On Sun, Jan 11, 2009 at 12:04 PM, Tim M wrote:
>>>
>>> On Sun, 11 Jan 2009 15:59:26 +1300, Tim M wrote:
Why does it still work for some objects?
>>>
>>>
>>> This works:
>>>
>>>
On Sun, 11 Jan 2009 16:10:39 +1300, Bill Baxter wrote:
On Sun, Jan 11, 2009 at 12:04 PM, Tim M wrote:
On Sun, 11 Jan 2009 15:59:26 +1300, Tim M wrote:
Why does it still work for some objects?
This works:
module test;
class A
{
this()
{
//
}
}
class
On Sun, Jan 11, 2009 at 12:04 PM, Tim M wrote:
> On Sun, 11 Jan 2009 15:59:26 +1300, Tim M wrote:
>> Why does it still work for some objects?
>
>
> This works:
>
>
> module test;
>
> class A
> {
>this()
>{
>//
>}
> }
>
> class B
> {
>this()
>
On Sun, Jan 11, 2009 at 11:33 AM, Tim M wrote:
>
> Why is this an error. Dmd wants to make sure that I declare a new variable
> in the foreach statement and not use an existing one?
>
> module test;
>
> void main()
> {
>int i;
>int[] nums;
>foreach(i; nums)
>{
>
On Sun, 11 Jan 2009 15:59:26 +1300, Tim M wrote:
On Sun, 11 Jan 2009 15:50:54 +1300, Daniel Keep
wrote:
Tim M wrote:
Why is this an error. Dmd wants to make sure that I declare a new
variable in the foreach statement and not use an existing one?
module test;
void main()
{
int i
On Sun, 11 Jan 2009 15:50:54 +1300, Daniel Keep
wrote:
Tim M wrote:
Why is this an error. Dmd wants to make sure that I declare a new
variable in the foreach statement and not use an existing one?
module test;
void main()
{
int i;
int[] nums;
foreach(i; nums)
{
On Sat, Jan 10, 2009 at 9:33 PM, Tim M wrote:
>
> Why is this an error. Dmd wants to make sure that I declare a new variable
> in the foreach statement and not use an existing one?
You can't reuse existing variables as foreach loop indices, long story short.
Tim M wrote:
Why is this an error. Dmd wants to make sure that I declare a new
variable in the foreach statement and not use an existing one?
module test;
void main()
{
int i;
int[] nums;
foreach(i; nums)
{
//
}
}
dmd test.d
test.d(7): Error: shadowing declar
Why is this an error. Dmd wants to make sure that I declare a new variable
in the foreach statement and not use an existing one?
module test;
void main()
{
int i;
int[] nums;
foreach(i; nums)
{
//
}
}
dmd test.d
test.d(7): Error: sha
On Sun, Jan 11, 2009 at 10:16 AM, bearophile wrote:
> Bill Baxter:
>> I've never found a use for typedef myself. I don't think it's used much,<
>
> In Pascal (and its variant and children, like ObjectPascals, etc) there is a
> section named Type where you define your typedefs. People used to pro
Bill Baxter:
> I've never found a use for typedef myself. I don't think it's used much,<
In Pascal (and its variant and children, like ObjectPascals, etc) there is a
section named Type where you define your typedefs. People used to program in
Pascal-like languages (ObjectPascals, Ada, Oberon, e
Bill Baxter wrote:
On Sun, Jan 11, 2009 at 8:23 AM, Charles Hixson
wrote:
Is it possible to use a typedefed variable with library classes?
In particular, what I've done is:
typedef int TestType;
TestType t;
File f;
t = 42;
f.write (t);
And the response I get is the compiler asking w
On Sun, Jan 11, 2009 at 8:23 AM, Charles Hixson
wrote:
> Is it possible to use a typedefed variable with library classes?
>
> In particular, what I've done is:
>
> typedef int TestType;
> TestType t;
> File f;
>
> t = 42;
> f.write (t);
>
> And the response I get is the compiler asking whe
Is it possible to use a typedefed variable with library classes?
In particular, what I've done is:
typedef int TestType;
TestType t;
File f;
t = 42;
f.write (t);
And the response I get is the compiler asking whether I want to write
bytes or a long.
Am I doing something grossly wrong
Mike wrote:
> So I'm trying to link a C file to be used in a D program:
> I compile the C file with dmc: dmc -c hw.c
> and the D file with dmd: dmd -c hw_main.d
I usually keep it simple and do: dmd main.d hw.obj
So I'm trying to link a C file to be used in a D program:
hw.c:
#include
void hw()
{
printf("Hello, world!");
}
hw_main.d:
module hw_main;
extern (C) void hw();
int main()
{
hw();
return 0;
}
I compile the C file with dmc: dmc -c hw.c
and the D file with dmd: dmd
On Sat, Jan 10, 2009 at 6:39 AM, downs wrote:
> Jarrett Billingsley wrote:
>> On Sat, Jan 10, 2009 at 12:30 AM, Jarrett Billingsley
>> wrote:
>>> On Sat, Jan 10, 2009 at 12:18 AM, yes wrote:
Does Phobos also do threadpools?
>>> From what I understand, not without modification. At least, no
Jarrett Billingsley wrote:
> On Sat, Jan 10, 2009 at 12:30 AM, Jarrett Billingsley
> wrote:
>> On Sat, Jan 10, 2009 at 12:18 AM, yes wrote:
>>> Does Phobos also do threadpools?
>> From what I understand, not without modification. At least, not
>> efficiently. Downs has implemented such a thing
On Wed, 07 Jan 2009 19:47:57 -0500, Sam Hu wrote:
> Morning,
>
> Anybody can help?
>
> Regards,
> Sam
try this:
auto nameSet=new TreeBag!(char[])(null, (char[] first,char[] second) {
return icompare(first,second);
}
);
btw: tango.collection.* is deprecated and will be
22 matches
Mail list logo