Re: Should an 'extern(C++, "ns"):' override previous ones in the same scope?

2019-09-08 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, September 8, 2019 12:12:53 PM MDT Exil via Digitalmars-d-learn wrote: > On Saturday, 7 September 2019 at 22:19:48 UTC, Jonathan M Davis > > wrote: > > On Saturday, September 7, 2019 3:40:58 PM MDT Exil via > > > > Digitalmars-d-learn wrote: > >> On Saturday, 7 September 2019 at

Re: Should an 'extern(C++, "ns"):' override previous ones in the same scope?

2019-09-08 Thread Exil via Digitalmars-d-learn
On Saturday, 7 September 2019 at 22:19:48 UTC, Jonathan M Davis wrote: On Saturday, September 7, 2019 3:40:58 PM MDT Exil via Digitalmars-d-learn wrote: On Saturday, 7 September 2019 at 17:22:07 UTC, Jonathan M Davis wrote: > @safe: > @system: > > then @system overrides @safe. Just to add

Re: Learning delegates

2019-09-08 Thread Rémy Mouëza via Digitalmars-d-learn
On Sunday, 8 September 2019 at 10:04:57 UTC, Joel wrote: I'm trying to understand delegates. Is there any good ways I can get a better understanding of them? I am no compiler implementer, so what is below may contain a lot of inaccuracies and conceptual shortcuts, but here is my view of

Sum of three cubes

2019-09-08 Thread BigNum via Digitalmars-d-learn
import std.stdio, std.bigint; // // https://twitter.com/robinhouston/status/1169877007045296128 // void main() { BigInt a = "80538738812075974"; BigInt b = "80435758145817515"; BigInt c = "12602123297335631"; writeln("42=", (-a)^^3 + b^^3 + c^^3); }

Re: Learning delegates

2019-09-08 Thread berni via Digitalmars-d-learn
On Sunday, 8 September 2019 at 10:04:57 UTC, Joel wrote: I'm trying to understand delegates. Is there any good ways I can get a better understanding of them? I wrote a foreach loop using opApply. A side effect of that was, that after I managed to do this I understood delegates. :-)

Re: Learning delegates

2019-09-08 Thread Max Samukha via Digitalmars-d-learn
On Sunday, 8 September 2019 at 10:04:57 UTC, Joel wrote: I'm trying to understand delegates. Is there any good ways I can get a better understanding of them? You may want to read this: https://tour.dlang.org/tour/en/basics/delegates

Re: Should an 'extern(C++, "ns"):' override previous ones in the same scope?

2019-09-08 Thread Max Samukha via Digitalmars-d-learn
On Sunday, 8 September 2019 at 09:35:03 UTC, Jonathan M Davis wrote: The C++ support has been improved kind of piecemeal over time, and initially, none of it was documented. So, it wasn't exactly fully planned out when it was added. IIRC, it was added originally so that the dmd frontend

Learning delegates

2019-09-08 Thread Joel via Digitalmars-d-learn
I'm trying to understand delegates. Is there any good ways I can get a better understanding of them?

Re: Should an 'extern(C++, "ns"):' override previous ones in the same scope?

2019-09-08 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, September 8, 2019 3:03:31 AM MDT Max Samukha via Digitalmars-d- learn wrote: > On Saturday, 7 September 2019 at 22:19:48 UTC, Jonathan M Davis > > wrote: > > On Saturday, September 7, 2019 3:40:58 PM MDT Exil via > > > > Digitalmars-d-learn wrote: > >> On Saturday, 7 September 2019 at

Re: Should an 'extern(C++, "ns"):' override previous ones in the same scope?

2019-09-08 Thread Max Samukha via Digitalmars-d-learn
On Saturday, 7 September 2019 at 22:19:48 UTC, Jonathan M Davis wrote: On Saturday, September 7, 2019 3:40:58 PM MDT Exil via Digitalmars-d-learn wrote: On Saturday, 7 September 2019 at 17:22:07 UTC, Jonathan M Davis wrote: > @safe: > @system: > > then @system overrides @safe. Just to add

Re: Newbie linker errors - still missing _fltused _tls_index _tls_used localtime tzset mainCRTStartup

2019-09-08 Thread Rainer Schuetze via Digitalmars-d-learn
On 08/09/2019 00:30, malpropism wrote: > I just ported my Java application to D, got it to compile, but not to link. > > I'm using Windows 10 64 bit, DMD 2.088.0 , Visual D 0.50.1.  This would > be a C/C++ project in Visual Studio with only D code. > > With my first attempt, I'm missing 65

Newbie linker errors - still missing _fltused _tls_index _tls_used localtime tzset mainCRTStartup

2019-09-08 Thread malpropism via Digitalmars-d-learn
PS: Here are the actual linker errors: 1>phobos64.lib(gc_23c0_122.obj) : error LNK2001: unresolved external symbol _fltused 1>phobos64.lib(ti_float_2680_3f3.obj) : error LNK2001: unresolved external symbol _fltused 1>phobos64.lib(hash_d99_76c.obj) : error LNK2001: unresolved external symbol