Le 24/02/2011 13:17, bearophile a écrit :
Funog:
Thanks ^^ But I actually asked my question wrong ; I also need to check
whether abc is an associative array or not.
Adapted from the module tango.core.Traits:
template IsAA(T) {
const bool IsAA = is( typeof(T.init.values[0])[typeof
Le 23/02/2011 18:36, bearophile a écrit :
Funog:
In the case of an associative array, is it possible to retrieve both the
value and key type? (D1)
template AAKeyType(T) {
alias typeof(T.keys[0]) AAKeyType;
}
template AAValType(T) {
alias typeof(T.values[0]) AAValType;
}
Bye
static if ( is(abc U : U[]) )
... aliases U to whatever abc is an array of.
In the case of an associative array, is it possible to retrieve both the
value and key type? (D1)
Is it possible to run an external .exe and have access to its standard
input/output? Apparently std.process does not allow this.
Can I have some clues on how to use DDE in a D program?
Thanks.
downs wrote:
funog wrote:
The following code :
--
import std.stdio;
class A {
void foo(A a) {
writefln("A");
}
}
class B : A {
void foo(B b) {
writefln("B");
}
}
void main() {
B b = new B;
A a = b;
assert(
The following code :
--
import std.stdio;
class A {
void foo(A a) {
writefln("A");
}
}
class B : A {
void foo(B b) {
writefln("B");
}
}
void main() {
B b = new B;
A a = b;
assert(a is b);
b.foo(b);
a.foo(b);
}
--
ou
Stewart Gordon Wrote:
> Funog wrote:
> > How can I get a D1 console program to use ANSI codes? Currently it just
> > prints the escape character like any other...
>
> At first I thought you meant the ANSI character set, but then I realised
> you're probably talking
How can I get a D1 console program to use ANSI codes? Currently it just prints
the escape character like any other...
Steven Schveighoffer Wrote:
> On Wed, 12 Aug 2009 13:00:22 -0400, funog wrote:
>
> > Is there a way to make the current thread sleep for a given amount of
> > time, while having the possibility of another thread "waking it up"
> > earlier?
>
> Crea
Is there a way to make the current thread sleep for a given amount of time,
while having the possibility of another thread "waking it up" earlier?
11 matches
Mail list logo