Re: Why do 'abstract' methods with 'in' or 'out' contracts require a body?

2014-09-13 Thread Trey Brisbane via Digitalmars-d-learn
On Saturday, 13 September 2014 at 07:32:23 UTC, Marc Schütz wrote: I thought it was an error, but then I found this in the documentation: http://dlang.org/attribute.html#abstract "Functions declared as abstract can still have function bodies. This is so that even though they must be overridde

Why do 'abstract' methods with 'in' or 'out' contracts require a body?

2014-09-12 Thread Trey Brisbane via Digitalmars-d-learn
Hey all, I have a class method defined like so: abstract class MyClass { public: @property abstract SomeClassType getField() pure nothrow out(result) { assert(result !is null, "Error: getField() returned null."); } } As you can see, this method is

Re: How/why can toStringz() and toUTFz() be used as properties?

2013-04-26 Thread Trey Brisbane
On Friday, 26 April 2013 at 08:49:10 UTC, anonymous wrote: On Friday, 26 April 2013 at 07:31:57 UTC, Trey Brisbane wrote: Hey all, Can someone please explain to me how and why it is that toStringz() and toUTFz() can be used in the following way? string a = "123"; auto b = a.toStr

How/why can toStringz() and toUTFz() be used as properties?

2013-04-26 Thread Trey Brisbane
Hey all, Can someone please explain to me how and why it is that toStringz() and toUTFz() can be used in the following way? string a = "123"; auto b = a.toStringz; auto c = a.toUTFz; Also, how is it that they can even be called as if they were class methods? That is: string a = "123"; auto

Re: x64 Link Issues - Can someone please help?

2013-04-20 Thread Trey Brisbane
It seems my resources were breaking the link! Essentially, I was suffering from this problem: http://stackoverflow.com/questions/10888391/link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-invalid-or-c/14144713 In any case, problem solved. Thanks! :)

Re: x64 Link Issues - Can someone please help?

2013-04-20 Thread Trey Brisbane
On Saturday, 20 April 2013 at 04:46:45 UTC, dnewbie wrote: phobos64.lib(dmain2_4ac_1a5.obj) : error LNK2019: unresolved external symbol _Dmain referenced in function main Please add -L/DLL to the command line. Ahhh ok, thanks! I assumed DMD would have detected the output file being a DLL and

x64 Link Issues - Can someone please help?

2013-04-18 Thread Trey Brisbane
Hey all, I'm currently using D for a hook-based project that requires me to build both a 32bit and 64bit DLL. Naturally, the 32bit DLL builds fine, however I'm encountering linking issues for the 64bit. I followed the instructions at http://wiki.dlang.org/Installing_DMD_on_64-bit_Windows_7_(COFF-