On Sat, 14 Aug 2010 14:58:05 +0200, simendsjo wrote:
c:\temp\src\test.d
c:\temprdmd src\test
The system cannot find the path specified.
c:\temprdmd src/test
std.file.FileException: (...)\.rdmd\rdmd-src/test.d-(...): The system
cannot find the path specified.
Using rdmd 20090902, dmd
Trass3r u...@known.com wrote:
I don't think that this syntax is supported at all.
You need to use __gshared with the instance instead:
__gshared foo f;
Hence my asking 'Why is this not an error?'.
However, shared struct foo {} works, so one might
expect symmetry to dictate that __gshared
I have successfully made funtions and structs in shared libraries in linux with
dmd, but i have no idea how to do that with classes, and how call the static
this() funtion of the linked module, because variables ( even immutable ) are
not correctly set without calling it.
Thanks.
gzkp0s
The spec doesn't mention anything about nested functions here.
This works
void foo(int[] a, int x) { };
void main()
{
int[] array;
foo(array, 3);
array.foo(3);
}
But this gives undefined identifier module t.foo
void main()
{
void foo(int[] a, int x) { };
From http://digitalmars.com/d/2.0/statement.html#ForeachStatement,
Foreach over Structs and Classes with Ranges.
I read this as the Range design is a part of the language now. Is this
correct?
And is the spec a bit out of date in the examples?
It says foreach-/reverse translates to
for(
On Sunday 15 August 2010 09:40:53 g g wrote:
I have successfully made funtions and structs in shared libraries in linux
with dmd, but i have no idea how to do that with classes, and how call the
static this() funtion of the linked module, because variables ( even
immutable ) are not correctly
On Sunday 15 August 2010 10:12:06 simendsjo wrote:
From http://digitalmars.com/d/2.0/statement.html#ForeachStatement,
Foreach over Structs and Classes with Ranges.
I read this as the Range design is a part of the language now. Is this
correct?
And is the spec a bit out of date in the
Jonathan M Davis wrote:
Is there a standard and/or acceptable way to make sure that pre-conditions,
post-conditions, or invariants _fail_ when running unit tests? That is, lets
say I had a function like this
void func(int x)
in
{
assert(x 8);
}
body
{
//...
}
and I
On 15.08.2010 23:58, Jonathan M Davis wrote:
On Sunday 15 August 2010 10:12:06 simendsjo wrote:
From http://digitalmars.com/d/2.0/statement.html#ForeachStatement,
Foreach over Structs and Classes with Ranges.
I read this as the Range design is a part of the language now. Is this
correct?
This isn't a question but more of an observation. Here's an interesting
template from the docs:
template Foo(T, R...)
{
void Foo(T t, R r)
{
writeln(t);
static if (r.length)// if more arguments
Foo(r); // do the rest of the arguments
}
}
On Sunday 15 August 2010 20:18:27 Andrej Mitrovic wrote:
This isn't a question but more of an observation. Here's an interesting
template from the docs:
template Foo(T, R...)
{
void Foo(T t, R r)
{
writeln(t);
static if (r.length)// if more arguments
11 matches
Mail list logo