#main.d:
import m.f;
class A {
//class main.A member m is not accessible
//mixin(t!(typeof(this), m));
void m() {};
//here is ok
//mixin(t!(typeof(this), m));
}
void main(string[] args){}
#m.f
module m.f;
string t(alias cls, string method)() {
import std.traits;
I expected such an answer and I do understand the decisions behind it. Yet,
you gave me a really GOOD news! Having to write cast(ubyte) 1 was way too
much verbose for my liking, while the new ubyte(1) is reasonable enough.
Why not use `1u`?
On Wed, Jul 30, 2014 at 11:46 AM, Philippe Sigaud
philippe.sig...@gmail.com wrote:
I expected such an answer and I do understand the decisions behind it. Yet,
you gave me a really GOOD news! Having to write cast(ubyte) 1 was way too
much verbose for my liking, while the new ubyte(1) is
Justin's answers seems correct to me, and I don't know anything about your
specific use case, but I cannot resist to add:
Think twice before doing this kind of things. I know that sometimes this is
necessary or handy, but one of the great things about D is that it provides
so many higher-level
Actually, I am writing a climate simulation software, and I would
love to use D for parts of it.
However some code is in C, legacy code, and for speed resons. So
in some cases, I would like to send a bunch of variables , ints,
dubles and floats to an external C function. The thing is, I do
On Wednesday, 30 July 2014 at 07:08:17 UTC, Kozzi11 wrote:
#main.d:
import m.f;
class A {
//class main.A member m is not accessible
//mixin(t!(typeof(this), m));
void m() {};
//here is ok
//mixin(t!(typeof(this), m));
}
The compiler is trying to construct type A. The first
On Wednesday, 30 July 2014 at 16:14:56 UTC, Jesse Phillips wrote:
On Wednesday, 30 July 2014 at 07:08:17 UTC, Kozzi11 wrote:
#main.d:
import m.f;
class A {
//class main.A member m is not accessible
//mixin(t!(typeof(this), m));
void m() {};
//here is ok
//mixin(t!(typeof(this),
On Wed, 30 Jul 2014 15:44:14 +, seany wrote:
However some code is in C, legacy code, and for speed resons. So in some
cases, I would like to send a bunch of variables , ints, dubles and
floats to an external C function. The thing is, I do not always know the
number of variables, so my
Can you post the signatures of some of the C functions you're
trying to
interface with?
let us take a simple function :
int add (int a, int b)
Can't you call it directly?
extern(C)
{
int add (int a, int b)';
}
// ...
auto ret = add(123, 456);
LMB
On Wed, Jul 30, 2014 at 2:55 PM, seany via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Can you post the signatures of some of the C functions you're trying to
V Wed, 30 Jul 2014 14:33:51 +
seany via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
napsáno:
In Ali's excllent book, somehow one thing has escaped my
attention, and that it the mentioning of pointer arrays.
Can pointers of any type of pointed variable be inserted in an
int
Hi,
I'm writing this global Config class, with an AA member:
```d
module my.config;
class Config
{
Command[string] commands;
}
__gshared Config CONFIG;
```
and initialize it in another module:
```d
module my.app;
import my.config;
void main()
{
CONFIG = new Config();
12 matches
Mail list logo