Scope of enum

jfondren julian.fondren at gmail.com
Sun Jul 11 12:01:27 UTC 2021


On Sunday, 11 July 2021 at 10:58:58 UTC, DLearner wrote:
> Is there a way of forcing DMD to extend the scope of `MemSiz` 
> to include `k_mod`?
>
> Best regards

```
$ cat k_mod.d
import test01;

ubyte[MemSiz] MemPool;

$ cat test01.d
enum MemSiz = 240;

void main() {
     import std.stdio, k_mod;
     writeln(typeid(MemPool));
}

$ dmd test01.d k_mod.d
$ ./test01
ubyte[240]
```


More information about the Digitalmars-d-learn mailing list