On Wednesday, 18 November 2020 at 10:50:12 UTC, frame wrote:
I found the "bug". It was caused by a debug {} statement within
a struct method. I assume that the debug symbol is just
incompatible called from the DLL context.
Were the DLL and main program built in different modes
(debug/release)
On Thursday, 19 November 2020 at 04:23:13 UTC, Marcone wrote:
// Function threadingw()
void threadingw(HWND hwn, void delegate() fun) nothrow {
try {
// Function _fun()
extern(Windows)
uint _fun(void * arg){
(*(cast(void delegate()*) arg)
// Function threadingw()
void threadingw(HWND hwn, void delegate() fun) nothrow {
try {
// Function _fun()
extern(Windows)
uint _fun(void * arg){
(*(cast(void delegate()*) arg))(); // Do not show "Hello
World!" :(
On Thursday, 19 November 2020 at 00:20:50 UTC, Dibyendu Majumdar
wrote:
On Thursday, 19 November 2020 at 00:18:54 UTC, rikki cattermole
wrote:
You don't need the brackets to call a function (and with a
little help from UFCS):
void main() {
import std.stdio;
"Hello!
On Thursday, 19 November 2020 at 00:18:54 UTC, rikki cattermole
wrote:
You don't need the brackets to call a function (and with a
little help from UFCS):
void main() {
import std.stdio;
"Hello!".writeln;
writeln;
}
Okay thanks. Bad idea IMO.
On 19/11/2020 1:11 PM, Dibyendu Majumdar wrote:
On Thursday, 19 November 2020 at 00:08:59 UTC, Adam D. Ruppe wrote:
On Thursday, 19 November 2020 at 00:07:12 UTC, Dibyendu Majumdar wrote:
int function() fp = test;
This tries to *call* the function test and assign its return value to fp.
Re
On Thursday, 19 November 2020 at 00:08:59 UTC, Adam D. Ruppe
wrote:
On Thursday, 19 November 2020 at 00:07:12 UTC, Dibyendu
Majumdar wrote:
int function() fp = test;
You want &test to get the address.
Okay that works. Thanks
On Thursday, 19 November 2020 at 00:08:59 UTC, Adam D. Ruppe
wrote:
On Thursday, 19 November 2020 at 00:07:12 UTC, Dibyendu
Majumdar wrote:
int function() fp = test;
This tries to *call* the function test and assign its return
value to fp.
Really? why does it do that?
You want &test to
On Thursday, 19 November 2020 at 00:07:12 UTC, Dibyendu Majumdar
wrote:
int function() fp = test;
This tries to *call* the function test and assign its return
value to fp.
You want &test to get the address.
I have simple test program:
import core.stdc.stdio : printf;
void test() {
int* a;
printf("a == null %d\n", a == null);
}
int function() fp = test;
extern (C) void main() {
fp();
}
Why do I get:
\d\dmd-2.092.1\windows\bin64\dmd.exe -betterC tests.d
tests.d(5): Error: printf canno
On Monday, 16 November 2020 at 10:21:27 UTC, Per Nordlöw wrote:
I need a function that gets the relative path of a file in a
Git-repo and preferrably also its status.
I'm not sure I understand the question. I have written two
programs, hopefully one of them does what you want :D
Either via a
The following code
//
module foo;
static immutable ubyte [2] t = [2, 3];
ubyte g(const ubyte a) {
return cast (ubyte) (a + 1);
}
void f(const ubyte a, const ubyte b, const int i) {
ubyte [2] c = a > b ? [a.g(), b.g()] : [b, a]; // compile
ub
On Wednesday, 18 November 2020 at 22:29:17 UTC, Steven
Schveighoffer wrote:
How do I do something really simple for opCmp? I tried this it
didn't work:
return this == other ? 0 :
this.tupleof < other.tupleof ? -1 : 1;
std.typecons.Tuple has opCmp. So this works:
int opCmp(S other)
On Wednesday, 18 November 2020 at 22:29:17 UTC, Steven
Schveighoffer wrote:
I have a struct like this:
struct S
{
int x;
int y;
}
and I want a default comparison. The problem is, that
comparison doesn't have a default, and requires I implement
opCmp. While this is useful for the compile
I have a struct like this:
struct S
{
int x;
int y;
}
and I want a default comparison. The problem is, that comparison doesn't
have a default, and requires I implement opCmp. While this is useful for
the compiler, there's no default I know of that is an easy one-liner.
The truth is, I'
On 11/18/20 7:01 AM, Vino wrote:
>Request your help on how to call a function(listFile) from another
> function(getFilelist) within the same class(GetDirlist), below is an
> example code.
That code looks unnecessarily complex to me. First of all, parallel()
already executes the loop body in
On 11/18/20 11:25 AM, Vino wrote:
> why is this
> so complicated in D where as in PHP it is simple like below
>
> PHP Code:
> class PHPclass {
>function test1 ($st) { return $st; }
>function test2 () { return $this->test1("Test"); }
> }
>
> $obj = new PHPclass();
> print_r($obj->
On Wednesday, 18 November 2020 at 18:24:59 UTC, frame wrote:
On Wednesday, 18 November 2020 at 17:55:36 UTC, Vino wrote:
I made the changes as below , still not working
auto fltask = task!listFile(st);
to
auto fltask =
task!({listFile(st);})(this).executeInNewThread();
The syntax is just
On Wednesday, 18 November 2020 at 17:55:36 UTC, Vino wrote:
I made the changes as below , still not working
auto fltask = task!listFile(st);
to
auto fltask = task!({listFile(st);})(this).executeInNewThread();
The syntax is just wrong:
auto fltask = task!({listFile(st);})(this).executeInNe
On Wednesday, 18 November 2020 at 16:53:44 UTC, frame wrote:
On Wednesday, 18 November 2020 at 15:01:53 UTC, Vino wrote:
Hi All,
Request your help on how to call a function(listFile) from
another function(getFilelist) within the same
class(GetDirlist), below is an example code.
I think it
On Wednesday, 18 November 2020 at 15:01:53 UTC, Vino wrote:
Hi All,
Request your help on how to call a function(listFile) from
another function(getFilelist) within the same
class(GetDirlist), below is an example code.
I think it's basically the same issue like that recently opened
topic:
On Tuesday, 17 November 2020 at 21:08:21 UTC, Paul Backus wrote:
On Tuesday, 17 November 2020 at 19:07:42 UTC, Vino wrote:
auto pid = execute(["/usr/bin/aws ec2 describe-images
--filters 'Name=state,Values=available' --query
'Images[*].[ImageId]'"]);
[...]
auto pid = execute(["/usr/bin/aws ec2
Hi All,
Request your help on how to call a function(listFile) from
another function(getFilelist) within the same class(GetDirlist),
below is an example code.
Code:
class GetDirlist {
@system private auto listFile(immutable string st)
{
auto fl = execute(["ls","-l"]);
enforce(fl.status =
On Monday, 16 November 2020 at 22:22:42 UTC, frame wrote:
On Monday, 16 November 2020 at 21:58:44 UTC, Jack wrote:
What is the function prototype like and how are you declaring
that struct?
The struct is very simple, it contains:
I found the "bug". It was caused by a debug {} statement with
24 matches
Mail list logo