Re: std.format with named args

2023-10-17 Thread Imperatorn via Digitalmars-d-learn
On Tuesday, 17 October 2023 at 07:53:28 UTC, Vitaliy Fadeev wrote: On Tuesday, 17 October 2023 at 07:22:41 UTC, Vitaliy Fadeev wrote: [...] `scriptlike` looks perfecto! ```D enum JMP_ADDR_R = ... ... import scriptlike; writeln( mixin(interp

Re: std.format with named args

2023-10-17 Thread Vitaliy Fadeev via Digitalmars-d-learn
MP_ADDR_R )); ``` Please, help me find a solution... or exists std.format with named args ? or another solution with named args ? Without string interpolation the best you can do is https://dlang.org/library/std/conv/text.html Or write some code yourself, unfortunately May be. "String i

Re: std.format with named args

2023-10-17 Thread Vitaliy Fadeev via Digitalmars-d-learn
eadable. In future it will used in jump table, like this: ```D mixin( format!"asm { lea JMP_ADDR_R, qword ptr [ JMP_I_R * PTR_SIZE + TBL_ADDR ]; jmp [JMP_ADDR_R]; }"( JMP_I_R, PTR_SIZE, TBL_ADDR, JMP_ADDR_R )); ``` Please, help me find a solution... or exists std

Re: std.format with named args

2023-10-17 Thread Imperatorn via Digitalmars-d-learn
``D mixin( format!"asm { lea JMP_ADDR_R, qword ptr [ JMP_I_R * PTR_SIZE + TBL_ADDR ]; jmp [JMP_ADDR_R]; }"( JMP_I_R, PTR_SIZE, TBL_ADDR, JMP_ADDR_R )); ``` Please, help me find a solution... or exists std.format with named args ? or another solution with named args ? W

std.format with named args

2023-10-16 Thread Vitaliy Fadeev via Digitalmars-d-learn
MP_I_R * PTR_SIZE + TBL_ADDR ]; jmp [JMP_ADDR_R]; }"( JMP_I_R, PTR_SIZE, TBL_ADDR, JMP_ADDR_R )); ``` Please, help me find a solution... or exists std.format with named args ? or another solution with named args ?