Rainer Deyke wrote:
Jarrett Billingsley wrote:
"Members are always initialized to the default initializer for their
type, which is usually 0 for integer types and NAN for floating point
types. This eliminates an entire class of obscure problems that come
from neglecting to initialize a member i
A question about D1 specs (that may be useful for LDC).
In the following code there's anarray of structs S. Is it OK, according to D1
specs, to not initialize the memory of this array if the compiler sees that all
fields of S have a void init?
struct S { double x = void, y = void; }
void main()
On Sun, 30 Aug 2009 11:25:59 -0400, Ellery Newcomer
wrote:
Steven Schveighoffer wrote:
On Sat, 29 Aug 2009 20:15:55 -0400, Ellery Newcomer
wrote:
void blah(out bool a = false){
// blah blah blah
}
compile time use of blah results in error.
Am I doing anything wrong?
out implies a ref
Steven Schveighoffer wrote:
> What is i referencing when you call:
> foo();
Is this an argument for making
int j;
void foo(ref int i = &j);
foo():
legal D?
-manfred
On Mon, 31 Aug 2009 13:00:34 -0400, Manfred_Nowak
wrote:
Steven Schveighoffer wrote:
What is i referencing when you call:
foo();
Is this an argument for making
int j;
void foo(ref int i = &j);
foo():
legal D?
No, I'm just trying to explain why having a default value for a ref
On Mon, 31 Aug 2009 14:55:43 -0400, Steven Schveighoffer
wrote:
It's possible that something like what you wrote could work (although
I'd write it foo(ref int i = j)).
In fact, it does work, in D1 no less.
# cat testme.d
import tango.io.Stdout;
int j;
void foo(ref int i = j)
{
i++;
I was refactoring the following line of code:
foo(rand() % 256); -> foo(0);
and that causes Optlink to crash now. Any reason why it does so?
That particular file is just 157 lines long, but the whole project is quite
big, although there are no large files. The biggest one is ~140K, it's from
Steven Schveighoffer wrote:
> In fact, it does work, in D1 no less.
thx
... and another example, that initializing with int.max would serve
Walter's intentions better.
-manfred
Denis Koroskin wrote:
I was refactoring the following line of code:
foo(rand() % 256); -> foo(0);
and that causes Optlink to crash now. Any reason why it does so?
That particular file is just 157 lines long, but the whole project is quite
big, although there are no large files. The biggest
JT wrote:
i'm trying to create a binding for berkeley db dll and quickly ran into some
problems, how do i translate statement below.
int DB->open(DB *db, DB_TXN *txnid, const char *file,
const char *database, DBTYPE type, u_int32_t flags, int mode);
my normal approach would be,
extern (C)
Hello.
I have a function that starts off as follows. When peek is called for
the first time, f should be -2. It turns out to be garbage. f doesn't
get modified anywhere but peek and consume. peek doesn't get called
until lexer has returned. This is D 2.031. Is it me or the compiler?
public Token
Mike Parker Wrote:
> JT wrote:
> > i'm trying to create a binding for berkeley db dll and quickly ran into
> > some problems, how do i translate statement below.
> >
> > int DB->open(DB *db, DB_TXN *txnid, const char *file,
> > const char *database, DBTYPE type, u_int32_t flags, int mode);
>
Tom S wrote:
>
> And/or compile some modules without -g. Maybe you don't need debug
> symbols everywhere.
>
>
And please vote for
http://d.puremagic.com/issues/votes.cgi?action=show_bug&bug_id=424.
Something makes Walter think this bug is not critical.
13 matches
Mail list logo