On 7/7/18 7:28 AM, kdevel wrote:
It appears not to be possible to use static if in "guard clause style"
as in
void bar (T ...) (T args)
{
static if (args.length == 0)
return;
writeln (args [0]);
return bar (args [1 .. $]);
}
Is this intended?
Yes.
On Monday, 9 July 2018 at 17:26:30 UTC, vino.B wrote:
Request Help:
void process(alias coRoutine, T...)(Array!string Dirlst, T
params)
{
ReturnType!coRoutine rData; / This line is not
working
alias scRType = typeof(coRoutine(string.init, T.init));
auto PFresult =
On Monday, 9 July 2018 at 15:49:50 UTC, Alex wrote:
On Monday, 9 July 2018 at 15:40:53 UTC, vino.B wrote:
On Sunday, 8 July 2018 at 19:10:24 UTC, Alex wrote:
On Sunday, 8 July 2018 at 18:46:31 UTC, vino.B wrote:
Request you help, in the below code we pass the function
"Testfun" as a
On Monday, 9 July 2018 at 13:48:05 UTC, Kagamin wrote:
Correct signature:
extern(C) void GetParamNames(const(char)** paramNames, size_t
numParams);
In C const applies only to the nearest member.
Thank you, that looks great.
Kind regards
Andre
On Monday, 9 July 2018 at 15:40:53 UTC, vino.B wrote:
On Sunday, 8 July 2018 at 19:10:24 UTC, Alex wrote:
On Sunday, 8 July 2018 at 18:46:31 UTC, vino.B wrote:
Request you help, in the below code we pass the function
"Testfun" as a parameter to another function "process" in
order for the
On Sunday, 8 July 2018 at 19:10:24 UTC, Alex wrote:
On Sunday, 8 July 2018 at 18:46:31 UTC, vino.B wrote:
Request you help, in the below code we pass the function
"Testfun" as a parameter to another function "process" in
order for the function "process" to work we have to specify
the type of
Correct signature:
extern(C) void GetParamNames(const(char)** paramNames, size_t
numParams);
In C const applies only to the nearest member.
const(char)*[] znames;
znames.length=4;
GetParamNames(znames.ptr, znames.length);
const char[][] names=znames.map!fromStringz.array;
On Monday, 9 July 2018 at 11:39:46 UTC, Basile B. wrote:
Ok, i've read your other answers and it seems that you have a
way to test so i think you'll figure it out yourself, but you
don't need to alloc. Once the fromStringz verified to be good
maybe dup/idup in case the C lib free the stuff
On Monday, 9 July 2018 at 11:10:01 UTC, Basile B. wrote:
On Monday, 9 July 2018 at 10:56:18 UTC, Andre Pany wrote:
On Monday, 9 July 2018 at 10:38:54 UTC, Basile B. wrote:
On Monday, 9 July 2018 at 10:33:03 UTC, Andre Pany wrote:
Hi, no it's not correct i think, right translation would be
On Monday, 9 July 2018 at 10:56:18 UTC, Andre Pany wrote:
On Monday, 9 July 2018 at 10:38:54 UTC, Basile B. wrote:
On Monday, 9 July 2018 at 10:33:03 UTC, Andre Pany wrote:
Hi, no it's not correct i think, right translation would be
extern(C) void GetParamNames(const char** paramNames,
On Monday, 9 July 2018 at 10:56:18 UTC, Andre Pany wrote:
On Monday, 9 July 2018 at 10:38:54 UTC, Basile B. wrote:
On Monday, 9 July 2018 at 10:33:03 UTC, Andre Pany wrote:
Hi, no it's not correct i think, right translation would be
extern(C) void GetParamNames(const char** paramNames,
On Monday, 9 July 2018 at 10:38:54 UTC, Basile B. wrote:
On Monday, 9 July 2018 at 10:33:03 UTC, Andre Pany wrote:
Hi, no it's not correct i think, right translation would be
extern(C) void GetParamNames(const char** paramNames,
size_t numParams);
If you use the D array syntax you'll get
On Monday, 9 July 2018 at 10:33:03 UTC, Andre Pany wrote:
Hi,
I need to call a C function within a DLL which has following
signature:
void GetParamNames (const char *paramNames[], size_t
numParams);
The purpose of this function is to return a list of texts
I defined in D:
extern(C)
Hi,
I need to call a C function within a DLL which has following
signature:
void GetParamNames (const char *paramNames[], size_t numParams);
The purpose of this function is to return a list of texts
I defined in D:
extern(C) GetParamNames (const char[]* paramNames, size_t
numParams);
Is
On Monday, 9 July 2018 at 09:38:30 UTC, ag0aep6g wrote:
The `win` you're creating in `init` is a function-local
variable. It ceases to exist when `init` returns. It's not
`this.win`.
In `run`, you're accessing `this.win`. It's still null because
you never assigned anything there.
So change
On 07/09/2018 11:18 AM, Flaze07 wrote:
class Game
{
[...]
RenderWindow win;
[...]
void init()
{
[...]
auto win = new RenderWindow( VideoMode( 600, 600 ), "snake" );
[...]
}
void run()
{
[...]
writeln( win is null );
[...]
}
}
the
On Monday, 9 July 2018 at 09:18:50 UTC, Flaze07 wrote:
I am using DSFML
module game;
[...]
oh, and I forgot, I had
Game myGame;
static this()
{
myGame = new Game;
}
below the Game class
I am using DSFML
module game;
import core.time;
import std.stdio: writeln;
import dsfml.graphics;
import dsfgui.button;
import apple;
import snake;
class Game
{
private:
enum State { menu, playing }
State state;
Font font;
Button playBtn;
Snake snake;
Apple apple;
On Monday, 9 July 2018 at 05:54:27 UTC, vino.B wrote:
On Sunday, 8 July 2018 at 19:22:32 UTC, Timoses wrote:
Perhaps you could tell us what your goal is. People here might
come up with a nice solution. Why do you feel like having to
use templated functions in the first place? That is, what is
On Monday, 9 July 2018 at 05:54:27 UTC, vino.B wrote:
In phase 2 we are transferring few more function to the
existing D code, and these functions has variable number of
parameter and different type eg: Function3(string, string,
string), Function(string, int, string, int).
Initially I
You can enable logging in GC and see what's allocated and
collected.
22 matches
Mail list logo