Order of evaluation for named arguments

Ogion ogion.art at gmail.com
Tue Apr 1 09:11:08 UTC 2025


On Tuesday, 1 April 2025 at 09:05:59 UTC, Ogion wrote:
> Same with ArrayInitializer:
>  ```D
> import std.stdio;
>
> int fun(int v)
> {
>     v.writeln;
>     return v;
> }
>
> void main() {
> 	int[2] a = [ 1:fun(1), 0:fun(2) ];
> }
> ```
> 1
> 2

Correction:
2
1


More information about the Digitalmars-d mailing list