Re: Reset Range

2015-05-30 Thread Philpax via Digitalmars-d-learn
On Saturday, 30 May 2015 at 08:36:02 UTC, tcak wrote: I have never interested in Range topic till now, but with Walter's presentation, I took a look at it today. Ali has a nice lesson page about it (http://ddili.org/ders/d.en/ranges.html). What I don't get is the mechanism to reset a range.

Re: @safe, pure and nothrow at the beginning of a module

2014-08-15 Thread Philpax via Digitalmars-d-learn
On Friday, 15 August 2014 at 23:22:27 UTC, Vlad Levenfeld wrote: On Friday, 15 August 2014 at 16:54:54 UTC, Philippe Sigaud wrote: So I'm trying to use @safe, pure and nothrow. If I understand correctly Adam Ruppe's Cookbook, by putting @safe: pure: nothrow: at the beginning of a module, I

Re: Cannot alias null

2014-06-13 Thread Philpax via Digitalmars-d-learn
On Friday, 13 June 2014 at 15:05:49 UTC, Tom Browder via Digitalmars-d-learn wrote: On Fri, Jun 13, 2014 at 7:59 AM, via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Thursday, 12 June 2014 at 21:07:47 UTC, Tom Browder via Digitalmars-d-learn wrote: What I was really trying

Re: D array to c

2014-06-05 Thread Philpax via Digitalmars-d-learn
On Friday, 6 June 2014 at 03:40:41 UTC, Harpo wrote: Hello I need to pass a array in D to c. I have edited the code to the important parts. Normally in C I would just do this: void myFunction(int *array) { } Then pass it a array of whatever size. However I actually need the array to be in a

Re: how to detect ctfe

2014-06-01 Thread Philpax via Digitalmars-d-learn
__ctfe can be used for this purpose: The __ctfe boolean pseudo-variable, which evaluates to true at compile time, but false at run time, can be used to provide an alternative execution path to avoid operations which are forbidden at compile time. Every usage of __ctfe is evaluated before