Re: D: How to check if a function is chained? a().b().c();

2023-11-18 Thread Julian Fondren via Digitalmars-d-learn
On Saturday, 18 November 2023 at 07:47:19 UTC, BoQsc wrote: `program("someProgramName").pipe("someOtherProgramName");` Executes and pipes output to another program. `program();` - Only executes the program. Serious answer: have a function handle this, instead of the semicolon.

Re: D: How to check if a function is chained? a().b().c();

2023-11-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 18 November 2023 at 07:47:19 UTC, BoQsc wrote: Let's say we have a chain of functions. ``` a().b().c(); ``` I would like to have a behaviour in `a()` that would check if there is `b()` or `c()` chained to it. If `a();`is not chained: do a `writeln("You forgot to chain this

Re: D: How to check if a function is chained? a().b().c();

2023-11-18 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 18 November 2023 at 07:47:19 UTC, BoQsc wrote: Let's say we have a chain of functions. ``` a().b().c(); ``` I would like to have a behaviour in `a()` that would check if there is `b()` or `c()` chained to it. If `a();`is not chained: do a `writeln("You forgot to chain this

D: How to check if a function is chained? a().b().c();

2023-11-17 Thread BoQsc via Digitalmars-d-learn
Let's say we have a chain of functions. ``` a().b().c(); ``` I would like to have a behaviour in `a()` that would check if there is `b()` or `c()` chained to it. If `a();`is not chained: do a `writeln("You forgot to chain this function!");` A function that executes a program For me