Re: request switch statement with common block

2013-08-05 Thread MattCodr
On Monday, 5 August 2013 at 04:07:55 UTC, Andre Artus wrote: Andre Artus: int number; string message; switch (number) { default: // valid: ends with 'throw' throw new Exception("unknown number"); case 3: message ~= "three "; break; case 4:

Re: request switch statement with common block

2013-08-03 Thread MattCodr
On Saturday, 3 August 2013 at 14:38:48 UTC, JS wrote: switch (cond) common: always executed code here case A : etc... } instead of if (cond) { always executed code here } switch (cond) case A : etc... } which requires modification of the condition twice when ne

Re: The kind of documentation people like

2013-03-06 Thread MattCodr
On Wednesday, 6 March 2013 at 08:17:58 UTC, Walter Bright wrote: What I get from this is that people really like PHP's documentation style where users can add to it. Of course, plus the rank system, (where the best answers appears first), you "almost" have a winner. I said "almost", because

Re: D as a prototyping language (for C/C++ projects)

2013-02-26 Thread MattCodr
On Tuesday, 26 February 2013 at 15:26:17 UTC, Craig Dillabaugh wrote: I was curious to know if anyone else uses D like this. I usually do this, but in a little different way. I wrote my code in a interpreted language, and then I port to D or C languages.

Re: [your code here]

2012-02-17 Thread MattCodr
Nice, but just a little thing: switch(toUpper(returned)) { case 'Y': break checkLoop; case 'H': {low=guess; break;} case 'L': {high=guess; break;} default: break; } PS: Yeah you can you tolower() too! On Friday, 17 February 2012 at 23:50:32 UTC, Matt Soucy wrote: #!/us

Re: Bug? taskPool.map() with bufSize and writeln() gets stuck

2012-02-10 Thread MattCodr
On Saturday, 11 February 2012 at 01:31:29 UTC, Ali Çehreli wrote: Sorry for the double-post; I have asked the same question on D.learn earlier but I think this is more of a question to this forum. Tested on Ubuntu 11.10 64-bit dmd. The following program gets stuck during the writeln() call.