On Wednesday, 13 December 2017 at 18:24:09 UTC, Thomas wrote:
Or is there a better solution for tracing the error position from root till the branch ?


Speaking of tracing exceptions, here's my favourite one .. so far ;-)
(I mean come on.. debugging is great fun!)

btw. If you compile/run this code on Windows, using LDC, you'll get a nice little beep from the speaker (when it runs).

// ------------
module test;

import std.stdio;

void main()
{
    auto str = "hello";
    string * ptr = &str;
    writeln(ptr[1]);   //compile without using the -O option
// writeln(ptr.ptr[1]); // the above line was meant to be this line.
}
// ------------

Reply via email to