colorPanMonth =
convertToColor(cast(uint)ColorValues.MidnightBlue);
Thanks in advance for your help,
TSalm
Le Sat, 29 Nov 2008 01:08:28 +0100, BCS [EMAIL PROTECTED] a écrit:
Reply to TSalm,
Hello,
I would do something like this, but this return me an execution error
: object.Exception: Stack Overflow
// CODE
class A
{
void delegate() dg;
void doIt()
{
dg();
}
}
class B
Le Sat, 29 Nov 2008 01:49:20 +0100, BCS [EMAIL PROTECTED] a écrit:
struct C(R, A...)
{
A args;
R function(A) dg;
static R delegate() opCall(R function(A) dg, A a)
{
C!(R, A) ret;
ret.dg=dg;
foreach(int i,_;A)
ret.args[i] = a[i];
return ret.fn;
}
R fn() {
Excellent explication !
Thank you Frits
Le Sat, 14 Feb 2009 17:58:35 +0100, Frits van Bommel
fvbom...@remwovexcapss.nl a écrit:
TSalm wrote:
Hello,
In the code below, why the first Stdout throws a Exception when the
second doesn't ?
/* CODE */
import
take a look at static if and is
http://www.digitalmars.com/d/1.0/version.html#staticif
http://www.digitalmars.com/d/1.0/expression.html#IsExpression
Thanks for this links.
But I don't see anything about how to test if it's an array or not...
Is it not possible ?
Le Tue, 17 Feb 2009 23:03:04 +0100, BCS n...@anon.com a écrit:
Hello TSalm,
take a look at static if and is
http://www.digitalmars.com/d/1.0/version.html#staticif
http://www.digitalmars.com/d/1.0/expression.html#IsExpression
Thanks for this links.
But I don't see anything about how to test
TSalm Wrote:
int compare(T:T[])(T[] o1,T[] o2)
Change this line to:
int compare(T:T[])(T o1, T o2)
You are right.
But despite this function, at compile time, an error is return :
.\src\tsalm\tools\Generic.d(20): Error: cannot implicitly convert
expression (o2 - o1) of type int[3u
).newline ;
}
/* --- END CODE */
Thanks in advance for your help,
TSalm
= 10 ;
Stdout(a.func).newline ;
}
/* --- END CODE */
Thanks in advance for your help,
TSalm
I'm not sure but I think package is not virtual.
:-(
So there's really no way to have a method declared package in an
interface ?
Le Sat, 21 Feb 2009 04:00:42 +0100, Daniel Keep
daniel.keep.li...@gmail.com a écrit:
TSalm wrote:
I'm not sure but I think package is not virtual.
:-(
So there's really no way to have a method declared package in an
interface ?
You also can't have a private function in an interface
a void* to his value
* Params:
* ptr =
* Returns:
*/
T fromPtr(T)(void* ptr)
{
return *(cast(T*)ptr) ;
}
/* --- END CODE */
Thanks in advance,
TSalm
I'm trying to build function which have the hability to convert a type
to void* and from void*.
I must use ref in the toPtr function because of this :
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.comgroup=digitalmars.D.learnartnum=15600
Do you think that what I done is
I'm trying to build function which have the hability to convert a type
to void* and from void*.
First of all, I have to ask: have you looked at std.variant /
tango.core.Variant?
Yes, but it seems that Variant class uses more memory than void* .
[...]
I get the distinct impression that
TSalm wrote:
I'm trying to build function which have the hability to convert a
type
to void* and from void*.
First of all, I have to ask: have you looked at std.variant /
tango.core.Variant?
Yes, but it seems that Variant class uses more memory than void* .
The Phobos Variant will use
Le Wed, 25 Feb 2009 01:03:32 +0100, Daniel Keep
daniel.keep.li...@gmail.com a écrit:
TSalm wrote:
In my case, there's also no possibility to get the wrong type, because
it is managed by the type of the ColumnMem.
You still have to get the code right. There's a surprising number of
corner
Le Sat, 28 Mar 2009 12:21:52 +0100, Jarrett Billingsley
jarrett.billings...@gmail.com a écrit:
On Sat, Mar 28, 2009 at 6:12 AM, TSalm ts...@free.fr wrote:
Hello,
Is there a way to specifie a constant argument ( I would say an
argument for
which his value is evaluate at compile time
Hello,
What is the C equivalent for the D float type ?
Thanks in advance,
TSalm
What is the C equivalent for the D float type ?
float and double is double.
in c, real support is compiler dependant, it may or may not
be available.
Thanks !
Must create a ticket for it ?
I think so. Unless others object in 10 minutes... :)
:-)
Done : https://issues.dlang.org/show_bug.cgi?id=14925
Thanks for your help
... don't understand
why since the documentation says :
String literals are immutable (read only).
How this function can change a type that is immutable ?
Thanks for your help.
TSalm
On Saturday, 15 August 2015 at 08:07:43 UTC, Ali Çehreli wrote:
This looks like a bug to me. The template constraints of the
two overloads are pretty complicated. This case should match
only one of them.
Yes I understand. I've used ldc2. With DMD (v0.067.1) the error
is more clear :
22 matches
Mail list logo