Dynamic length string array at compile time?

Dany12L dany12719l at gmail.com
Tue Jun 6 20:38:52 UTC 2023


On Tuesday, 6 June 2023 at 14:26:01 UTC, Steven Schveighoffer 
wrote:
> On 6/5/23 11:45 AM, Dany12L wrote:
>> Hi, I'd be interested to know if it's possible to have a 
>> dynamic length array containing strings generated at compile 
>> time.
>> 
>> 
>
> Sure. Just do it. Probably the reason nobody answered the 
> question yet is that it trivially works if you try it :) Unless 
> you did try it and it didn't work? In that case, post your 
> code, I'm sure we can fix it.
>
> -Steve

My concern would be to create an immutable array (or other 
"equivalent") of strings by adding elements to the array at 
compile time from different modules.

I would like to know if it is possible to do something similar



More information about the Digitalmars-d-learn mailing list