Re: Logging Function Parameters

2018-03-19 Thread Aliak via Digitalmars-d-learn
On Sunday, 18 March 2018 at 23:17:58 UTC, Dennis wrote: On Sunday, 18 March 2018 at 22:57:15 UTC, aliak wrote: // But you get a: // Error: Using the result of a comma expression is not allowed // writeln(mixin(arguments!f)); You can't mix part of a function call in: "Mixed in

Re: Logging Function Parameters

2018-03-18 Thread Seb via Digitalmars-d-learn
On Saturday, 17 March 2018 at 10:34:41 UTC, dom wrote: Hi, I am looking for a method to log the current function name + parameters. Getting the name of the current function is simply possible with __PRETTY_FUNCTION__ Is there some possibility to generically access the parameters of a

Re: Logging Function Parameters

2018-03-18 Thread Dennis via Digitalmars-d-learn
On Sunday, 18 March 2018 at 22:57:15 UTC, aliak wrote: // But you get a: // Error: Using the result of a comma expression is not allowed // writeln(mixin(arguments!f)); You can't mix part of a function call in: "Mixed in text must form complete declarations, statements, or

Re: Logging Function Parameters

2018-03-18 Thread aliak via Digitalmars-d-learn
On Saturday, 17 March 2018 at 10:34:41 UTC, dom wrote: Hi, I am looking for a method to log the current function name + parameters. Getting the name of the current function is simply possible with __PRETTY_FUNCTION__ Is there some possibility to generically access the parameters of a

Logging Function Parameters

2018-03-17 Thread dom via Digitalmars-d-learn
Hi, I am looking for a method to log the current function name + parameters. Getting the name of the current function is simply possible with __PRETTY_FUNCTION__ Is there some possibility to generically access the parameters of a function such that they can be iterated and printed out?