Re: extern (C) function call with const char * type will sometimes generate seg fault or core dump.

2014-10-16 Thread dysmondad via Digitalmars-d-learn
On Thursday, 16 October 2014 at 07:55:24 UTC, Mike Parker wrote: On 10/16/2014 4:54 PM, Mike Parker wrote: On 10/16/2014 12:18 PM, dysmondad wrote: Since I've added this call, my program will sometimes but not always either generate a core dump or a seg fault. It seems that the issue is with

extern (C) function call with const char * type will sometimes generate seg fault or core dump.

2014-10-15 Thread dysmondad via Digitalmars-d-learn
Since I've added this call, my program will sometimes but not always either generate a core dump or a seg fault. It seems that the issue is with the const char * parameter. I don't have a good grasp of the difference between the way D and C work for char * types. The call to loadTexture uses

Re: I don't get it. version(unittest) can't seem to use local variable

2014-07-12 Thread dysmondad via Digitalmars-d-learn
. try: unittest { Velocity v = new Velocity( 2.0f, 5.0f ); v *= 5.0f; // - line 110 printf( v = %s\n, to!string(v) ); } instead. Basically version is like static if, it doesn't indicate its a function. Instead it changes what code gets compiled. Where as a unittest

Re: I don't get it. version(unittest) can't seem to use local variable

2014-07-12 Thread dysmondad via Digitalmars-d-learn
... https://github.com/rikkimax/skeleton/blob/master/source/skeleton/syntax/download_mkdir.d#L175 Of course there will be better ones, just something I was doing last night however. Thanks for the link and the information. That's looks like what I need so I'm going to rip off your code

Re: DStyle: Braces on same line

2014-07-12 Thread dysmondad via Digitalmars-d-learn
On Saturday, 12 July 2014 at 19:01:56 UTC, Danyal Zia wrote: Hi, I noticed that in Andrei's talks and his book, he used braces on the same line of delcaration, however Phobos and other D libraries I know use braces on their own line. Now I'm in a position where I need to take decision on

I don't get it. version(unittest) can't seem to use local variable

2014-07-11 Thread dysmondad via Digitalmars-d-learn
I'm new to D. I've been using C since it was a baby and C++ back when it was only a pre-compiler for c. So, I may just be stuck thinking in C land. The issue is I am attempting to use the version(unittest) feature. However the compiler pukes up the error below. I'm sure it's something easy