Just another example of missing string interpolation

Walter Bright newshound2 at digitalmars.com
Tue Oct 17 19:03:48 UTC 2023


On 10/17/2023 10:37 AM, Adam D Ruppe wrote:
> On Tuesday, 17 October 2023 at 17:27:41 UTC, Walter Bright wrote:
>> Oops, forgot the leading 'i':
>>
>> ```
>> stderr.write(i"$clear\r$(white)Progress:$clear$progress%
>> \t$(white)Speed:$clear $curSpeed $unit");
>> ```
> 
> Still won't work. Your dip1027 would write
> 
> %s\r%sProgress:%s%s%\t%sSpeed:%s %s %s\e[09m\e01m5\[30m\0[09m5bytes/sec
> 
> if you used it like that.

That's a misunderstanding of how it works.



More information about the Digitalmars-d mailing list