On Friday, 11 October 2024 at 06:04:44 UTC, Salih Dincer wrote:
On Friday, 11 October 2024 at 03:01:54 UTC, Alexa Schor wrote:
[...]

```d
import std.stdio, core.interpolation;
void show(Args...)(InterpolationHeader hdr, Args args, InterpolationFooter ftr)
{
  foreach (arg; args)
  {
   static if (is(typeof(arg) == InterpolatedExpression!code, string code))
      code.write;
   else static if (is(typeof(arg) == InterpolatedLiteral!str, string str))
      str.write;
    else write(" = ", arg);
  }
  writeln();
}

void main()
{
   int a = 5, b = 22;
   show(i`$(a), $(b), $(a + b)`);
   // a = 5, b = 22, a + b = 27
}
```
SDB@79

Oh how fantastic! What a great feature, thank you so much for your assistance.
Take care, and have a great day.

Alexa

Reply via email to