On 07/03/2014 01:43 PM, Jet wrote:
> void foo(immutable int* x, int* y) {
> bar(*x); // bar(3)
> *y = 4; // undefined behavior
> bar(*x); // bar(??)
> }
> ...
> int i = 3;
> foo(cast(immutable)&i, &i);
> --
> In the 2.065 version, I can compile. But that is
Awesome!!!
Thank you so much!
Thank you all. These answers are very detailed. I think I learned
a lot.
On Thu, Jul 03, 2014 at 09:06:11PM +, Jet via Digitalmars-d-learn wrote:
> There, how to distinguish between const and immutable? thank you~:)
>
> /**
> "Const types are like immutable types, except that const forms a
> read-only view of data. Other aliases to that same data may change it
> at
On Thursday, 3 July 2014 at 20:43:33 UTC, Jet wrote:
void foo(immutable int* x, int* y) {
bar(*x); // bar(3)
*y = 4; // undefined behavior
bar(*x); // bar(??)
}
...
int i = 3;
foo(cast(immutable)&i, &i);
--
In the 2.065 version, I can compile. But that is not i
On Thursday, 3 July 2014 at 21:06:12 UTC, Jet wrote:
There, how to distinguish between const and immutable? thank
you~:)
/**
"Const types are like immutable types, except that const forms
a read-only view of data. Other aliases to that same data may
change it at any time. "
"Any data refere
There, how to distinguish between const and immutable? thank
you~:)
/**
"Const types are like immutable types, except that const forms a
read-only view of data. Other aliases to that same data may
change it at any time. "
"Any data referenced by the const declaration cannot be changed
from
void foo(immutable int* x, int* y) {
bar(*x); // bar(3)
*y = 4; // undefined behavior
bar(*x); // bar(??)
}
...
int i = 3;
foo(cast(immutable)&i, &i);
--
In the 2.065 version, I can compile. But that is not in the
documentation.
On Thu, 03 Jul 2014 10:24:26 +
pgtkda via Digitalmars-d-learn
wrote:
> On Thursday, 3 July 2014 at 10:22:14 UTC, ponce wrote:
> > On Thursday, 3 July 2014 at 10:15:25 UTC, pgtkda wrote:
> >> why is this possible?
> >>
> >> int count = 50_000_000;
> >
> > int is always 4 bytes, it can contains
On Thursday, 3 July 2014 at 10:25:41 UTC, Bienlein wrote:
There is also a Semaphore and Barrier class:
http://dlang.org/phobos/core_sync_barrier.html
http://dlang.org/phobos/core_sync_semaphore.html
This is probably what I'd do, though both this and thread_joinAll
will only work if you have on
On 07/02/2014 08:29 PM, Puming wrote:
> I want to spawn several similar tasks and then wait for all of them to
> complete to go on do some other things, like:
[...]
> My current workaround is using messages:
I forgot to mention that if message passing is merely a "workaround" :)
in this case
On Thu, Jul 03, 2014 at 02:09:09AM +, safety0ff via Digitalmars-d-learn
wrote:
> On Thursday, 3 July 2014 at 02:02:19 UTC, safety0ff wrote:
> >On Thursday, 3 July 2014 at 01:55:14 UTC, safety0ff wrote:
> >>Actually, this is an enhancement because adding:
> >>enum b = blah
> >>
> >>Makes them f
On Thursday, 3 July 2014 at 07:20:52 UTC, ponce wrote:
On Thursday, 3 July 2014 at 04:46:02 UTC, K.K. wrote:
Is the only thing I'm missing the .dll's?
Thanks!
Yes, everything went fine, and you find the missing DLL here:
https://www.libsdl.org/download-2.0.php
On Thursday, 3 July 2014 at
On Thursday, 3 July 2014 at 04:51:07 UTC, Ali Çehreli wrote:
On 07/02/2014 08:29 PM, Puming wrote:
> I want to spawn several similar tasks and then wait for all
of them to
> complete to go on do some other things
If you don't care about account for each of them individually,
core.thread.thread
On Thursday, 3 July 2014 at 10:23:31 UTC, ponce wrote:
On Thursday, 3 July 2014 at 10:17:59 UTC, Kashyap wrote:
Hi,
Is there a source transformation for D available?
Could someone please point me to it?
If not, I'd like to work on one - I'd appreciate any pointers
on getting started. I am cons
There is also a Semaphore and Barrier class:
http://dlang.org/phobos/core_sync_barrier.html
http://dlang.org/phobos/core_sync_semaphore.html
On Thursday, 3 July 2014 at 10:15:25 UTC, pgtkda wrote:
why is this possible?
int count = 50_000_000;
int is always 4 bytes, it can contains from -2_147_483_648 to
2_147_483_647.
On Thursday, 3 July 2014 at 10:22:14 UTC, ponce wrote:
On Thursday, 3 July 2014 at 10:15:25 UTC, pgtkda wrote:
why is this possible?
int count = 50_000_000;
int is always 4 bytes, it can contains from -2_147_483_648 to
2_147_483_647.
oh, ok. I thought it only contains numbers to 2_000_000,
On Thursday, 3 July 2014 at 10:17:59 UTC, Kashyap wrote:
Hi,
Is there a source transformation for D available?
Could someone please point me to it?
If not, I'd like to work on one - I'd appreciate any pointers
on getting started. I am considering writing the whole thing in
D and not relying th
why is this possible?
int count = 50_000_000;
Hi,
Is there a source transformation for D available?
Could someone please point me to it?
If not, I'd like to work on one - I'd appreciate any pointers on
getting started. I am considering writing the whole thing in D
and not relying the lexer/parser in C that is already there.
Regards,
Kash
Derelict contains bindings to other libraries, not these
libraries themselves. dub downloads only these bindings, not
original libraries (since they are written in C, not D, and not
included in dub repositories). You should manually get necessary
libraries and put them in folder where .exe will
On Thursday, 3 July 2014 at 04:46:02 UTC, K.K. wrote:
Is the only thing I'm missing the .dll's?
Thanks!
Yes, everything went fine, and you find the missing DLL here:
https://www.libsdl.org/download-2.0.php
23 matches
Mail list logo