I need to store a hetrogeneous array of delegates. How can I do
this but still call the function with the appropriate number of
parameters at run time?
I have the parameters as Variant[] params and a function/delegate
pointer(void* for now).
Normally I'd push the parameters on the stack and
I requiring an undo feature in my code. Rather than go the
regular route of using commands, I'm wondering if D can
facilitate an undo system quite easily?
We can think of an undo system in an app as a sort of recorder.
The traditional method is to use commands and inverse-commands.
By recordi
On Monday, 9 October 2017 at 15:15:48 UTC, Zhuo Nengwen wrote:
test(cast(ushort) 1, (m, c) => {
writeln(m);
writeln(m);
});
Just remove the =>
(m, c) {
// code here
}
On Monday, 9 October 2017 at 14:54:33 UTC, Adam D. Ruppe wrote:
//test(cast(ushort) 1, (m, c) => { writeln(m); });
That's a function that returns a function.
Perhaps you meant to just remove the => and be left with a
multi-line function.
I simplified the test codes. I want write mode co
On Sunday, 8 October 2017 at 04:03:27 UTC, user1234 wrote:
On Sunday, 8 October 2017 at 02:58:36 UTC, Fra Mecca wrote:
On Saturday, 7 October 2017 at 23:54:50 UTC, user1234 wrote:
On Saturday, 7 October 2017 at 19:56:52 UTC, Fra Mecca wrote:
Hi all,
I am writing a backend that is partly Vibe.d
On Monday, 9 October 2017 at 14:34:48 UTC, Zhuo Nengwen wrote:
//test(cast(ushort) 1, (m, c) => { writeln(m); });
That's a function that returns a function.
Perhaps you meant to just remove the => and be left with a
multi-line function.
import std.stdio;
void test(ushort market, void delegate(ushort market, char* pc)
callback)
{
for (auto i = 0; i < 10; i++)
{
callback(cast(ushort) i, cast(char*) null);
}
}
void main()
{
test(cast(ushort) 1, (m, c) => writeln(m));
//test(cast(ushort) 1, (m, c) => {
On 2017-10-08 04:58, Fra Mecca wrote:
At the end I added them as linking options (lflags) but it is kinda odd
that it works given that everything is supplied to dmd as -Lobj.o
Everything passed to DMD with the -L flag is passed to the linker,
basically as is. So if the linker accepts object f
oops, it was my fault. sorry for noise. my apologies to ElementType ))
https://run.dlang.io/is/duecIS
On Saturday, 7 October 2017 at 18:14:00 UTC, Nordlöw wrote:
Is it currently possible to somehow do @nogc formatted output
to string?
I'm currently using my `pure @nogc nothrow` array-container
`CopyableArray` as
@safe pure /*TODO nothrow @nogc*/ unittest
{
import std.format : formattedWr
On Saturday, 7 October 2017 at 18:27:36 UTC, jmh530 wrote:
On Saturday, 7 October 2017 at 18:14:00 UTC, Nordlöw wrote:
It would be nice to be able to formatted output in -betterC...
Agreed. If you know the size of the buffer, you can use
sformat, which might be @nogc, but I don't know if it'
12 matches
Mail list logo