template BaseType(T: T[]) { alias BaseType!(T) BaseType; }
template BaseType(T) { alias T BaseType; }
> Otherwise, you need indexAssign:
>
> void indexAssign(TArray : TArray[])(TArray array, BaseType!(TArray) value,
> int[] indices...)
> {
> static if (is (typeof (array[0]) == typeof(value))
> {
I am doing some more experiments with pure functions in D2, I have seen this
compiles, but fails at runtime in some non fully clear way (DMD 2.030):
import std.stdio: writeln;
import std.c.stdlib: malloc;
pure foo(int n) {
int* p = cast(int*)malloc(int.sizeof * n);
if (p == null)
looks like Andrei is getting us some new users:
http://stackoverflow.com/questions/1003948/what-debugger-can-be-used-with-d-2-0-on-windows-and-how-do-i-use-it
void main()
{
int s;
mixin("s") = 5;
}
-
Line 4: found '=' when expecting ';'
http://www.digitalmars.com/d/1.0/expression.html#MixinExpression
Hello BCS,
void main()
{
int s;
mixin("s") = 5;
}
-
Line 4: found '=' when expecting ';'
http://www.digitalmars.com/d/1.0/expression.html#MixinExpression
(mixin("s")) = 5;
Given that the above works, it looks like the parser prematurely commits
to a mixin declaration when it finds "mixi
BCS escribió:
Hello BCS,
void main()
{
int s;
mixin("s") = 5;
}
-
Line 4: found '=' when expecting ';'
http://www.digitalmars.com/d/1.0/expression.html#MixinExpression
(mixin("s")) = 5;
Given that the above works, it looks like the parser prematurely commits
to a mixin declaration when
Hello,
Just get to my point to save time:
1.retro:
void testRetro()
{
int[] arr=[1,2,3,4,5];
auto retArr=retro(arr);
for(int i=0;i
Hello Ary,
BCS escribió:
Hello BCS,
void main()
{
int s;
mixin("s") = 5;
}
-
Line 4: found '=' when expecting ';'
http://www.digitalmars.com/d/1.0/expression.html#MixinExpression
(mixin("s")) = 5;
Given that the above works, it looks like the parser prematurely
commits to a mixin decla
BCS wrote:
void main()
{
int s;
mixin("s") = 5;
}
-
Line 4: found '=' when expecting ';'
http://www.digitalmars.com/d/1.0/expression.html#MixinExpression
mixin *expression*
(4+3) = 5;
hasen wrote:
BCS wrote:
void main()
{
int s;
mixin("s") = 5;
}
-
Line 4: found '=' when expecting ';'
http://www.digitalmars.com/d/1.0/expression.html#MixinExpression
mixin *expression*
(4+3) = 5;
Oh, never mind,
AssignExpression can be of the form:
ConditionalExpression = Assi
Hello hasen,
hasen wrote:
BCS wrote:
void main()
{
int s;
mixin("s") = 5;
}
-
Line 4: found '=' when expecting ';'
http://www.digitalmars.com/d/1.0/expression.html#MixinExpression
mixin *expression*
(4+3) = 5;
Oh, never mind,
AssignExpression can be of the form:
ConditionalExpress
11 matches
Mail list logo