Hi Mathieu,
this is a nice find.
I even wasn't aware, that your working example is possible.
Where is your knowledge abut this syntax from?
If it is a LibreCAD site, we should possibly clarify this.
This functionality in LibreCAD is provided by the
muparser library.
Because there was no update of muparser and no changes on the muparser implementation, I must assume, that this advanced using of the command line was never used before.
From my tests, I assume the problem is not muparser, but its implementation in LibreCAD.
I think the implementation is missing a recursive parsing of tokens.
Now the variable d becomes a simple string "\c+\c" which leads to the syntax error in expansion of \d.
So I see no workaround for this issue now. It needs a revamp of the muparser implementation.
The only reason I see behind the intention of your example is a kind of creating parametric drawings.
So what you can try is to make a spreadsheet with the formula parts and export a command file with absolute numbers.
There is a wiki article about this:
https://wiki.librecad.org/index.php?title=Pseudo-Scripting_With_ExcelArmin
investing less than half an hour into Search function can save hours or days of waiting for a solution