It there a way to get this to compile?

WhatMeWorry kheaser at gmail.com
Mon Sep 9 21:55:00 UTC 2019


On Monday, 9 September 2019 at 19:12:34 UTC, Adam D. Ruppe wrote:
> On Monday, 9 September 2019 at 19:08:17 UTC, WhatMeWorry wrote:
>> Is this even possible?
>
> what are you trying to do?
>
> if c is static, it just needs to be initialized by a helper 
> function, like
>
> int helper() {
>     int c = 60;
>    foreach(f; foundations)
>      c += 10;
>    return c;
> }
>
> static int c = helper(); // it initializes based on teh 
> function now

Oops. I'm trying to build up a complex formatting string of 
Console Virtual Terminal Sequences.  Should be ~= or is that =~.  
I never can remember.

immutable string brackets ~= "\033[" ~ to!string(r) ~ ";" ~ 
to!string(c) ~ "H";


More information about the Digitalmars-d-learn mailing list