Re: Tricky code with exceptions

2013-05-09 Thread Dan Olson
"evilrat" writes: > On Thursday, 9 May 2013 at 20:33:17 UTC, bearophile wrote: >> Brad Anderson: >> >>> a 64-bit Windows dmd build did not crash and here is the output. >> >> Thank you for the data point. So maybe the problem is only on 32 bit >> Windows. >> >> Bye, >> bearophile > > win8 dmd 2.0

Re: Tricky code with exceptions

2013-05-09 Thread Juan Manuel Cabo
On Friday, 10 May 2013 at 01:05:39 UTC, Juan Manuel Cabo wrote: Then, tested on Windows XP SP3 32 bits, dmd 2.062, and it DIDN'T CRASH. The output is: Mm, sorry!!, it did crash but I had dr watson disabled in that VM. Confirmed adding a writeln("finished") after the foreach, which isn't reach

Re: Tricky code with exceptions

2013-05-09 Thread Juan Manuel Cabo
Tested on Linux - Kubuntu 12.04 64bits dmd 2.058 -m32 dmd 2.058 64 bits dmd 2.062 -m32 dmd 2.062 and the output is this for all of the above: Loop: 0 Loop: 1 Caught Loop: 2 Loop: 3 Caught Loop: 4 Loop: 5 Caught Then, tested on Windows X

Re: Tricky code with exceptions

2013-05-09 Thread evilrat
On Thursday, 9 May 2013 at 20:33:17 UTC, bearophile wrote: Brad Anderson: a 64-bit Windows dmd build did not crash and here is the output. Thank you for the data point. So maybe the problem is only on 32 bit Windows. Bye, bearophile win8 dmd 2.062 32-bit also crashes

Re: Tricky code with exceptions

2013-05-09 Thread bearophile
Brad Anderson: a 64-bit Windows dmd build did not crash and here is the output. Thank you for the data point. So maybe the problem is only on 32 bit Windows. Bye, bearophile

Re: Tricky code with exceptions

2013-05-09 Thread Brad Anderson
On Thursday, 9 May 2013 at 18:24:46 UTC, Brad Anderson wrote: I just tested this for you when you hopped in IRC but you left before I could tell you that a 64-bit Windows dmd build did not crash and here is the output. Oh, and this was dmd 2.062 (just -m64).

Re: Tricky code with exceptions

2013-05-09 Thread Brad Anderson
On Thursday, 9 May 2013 at 11:24:03 UTC, bearophile wrote: A little Java program I've just found in a blog post: class Flow { static public void main(String[] args) { for (int i = 0; i < 6; ++i) { System.out.println("Loop: " + i); try { try {

Re: Tricky code with exceptions

2013-05-09 Thread Sean Kelly
For what it's worth, this runs fine on 64-bit OSX.

Re: Tricky code with exceptions

2013-05-09 Thread bearophile
Maxim Fomin: It works on dpaste http://dpaste.dzfl.pl/fcd2f2b5 which seems to be based on linux 2.62. On dpaste it also works on gdc2.060 and ldc2.060, both 64 bit. Which platform do you use? Vista 32. Probably I will add it to Bugzilla. P.S. Seems we can define new kind of forum contrib

Re: Tricky code with exceptions

2013-05-09 Thread Maxim Fomin
It works on dpaste http://dpaste.dzfl.pl/fcd2f2b5 which seems to be based on linux 2.62. Which platform do you use? P.S. Seems we can define new kind of forum contribution - some code works as expected in language X, but equivalent code in D goes ballistic. This is very sad.

Re: Tricky code with exceptions

2013-05-09 Thread Mike James
"bearophile" wrote in message news:pnwldlckpgrjvvuje...@forum.dlang.org... My D translation: import std.stdio; void main() { foreach (i; 0 .. 6) { writeln("Loop: ", i); try { try { if (i == 3) break; } final