Re: Retrieving call expression of a function

2015-11-28 Thread Quentin Ladeveze via Digitalmars-d-learn
On Saturday, 28 November 2015 at 17:19:40 UTC, tcak wrote: On Saturday, 28 November 2015 at 15:41:59 UTC, Quentin Ladeveze wrote: [...] mixin template could solve this problem as well I guess. It would, instead of calling a function, directly inject the code into where you call it. So, remov

Re: Retrieving call expression of a function

2015-11-28 Thread tcak via Digitalmars-d-learn
On Saturday, 28 November 2015 at 15:41:59 UTC, Quentin Ladeveze wrote: On Saturday, 28 November 2015 at 15:22:51 UTC, tcak wrote: On Saturday, 28 November 2015 at 15:02:32 UTC, Quentin Ladeveze wrote: Hi, Is it possible to retrieve the calling expression of a function ? Something like that

Re: Retrieving call expression of a function

2015-11-28 Thread Quentin Ladeveze via Digitalmars-d-learn
On Saturday, 28 November 2015 at 15:22:51 UTC, tcak wrote: On Saturday, 28 November 2015 at 15:02:32 UTC, Quentin Ladeveze wrote: Hi, Is it possible to retrieve the calling expression of a function ? Something like that --- import std.stdio; void funcTest(int x, float y) { writefln(get_ca

Re: Retrieving call expression of a function

2015-11-28 Thread tcak via Digitalmars-d-learn
On Saturday, 28 November 2015 at 15:02:32 UTC, Quentin Ladeveze wrote: Hi, Is it possible to retrieve the calling expression of a function ? Something like that --- import std.stdio; void funcTest(int x, float y) { writefln(get_call()); } void main() { float x = 0.2; funcTest(1+2, x+2

Retrieving call expression of a function

2015-11-28 Thread Quentin Ladeveze via Digitalmars-d-learn
Hi, Is it possible to retrieve the calling expression of a function ? Something like that --- import std.stdio; void funcTest(int x, float y) { writefln(get_call()); } void main() { float x = 0.2; funcTest(1+2, x+2); } --- output expected : " funcTest(1+2, x+2) " Thanks