3 ms·
Unless I am missing something, you can just use .length on a static array: int[5] a = [1,2,3,4,5]; writeln(a.length); // 5
by skocznymroczny 4y ago
Unless I am missing something, you can just use .length on a static array:
int[5] a = [1,2,3,4,5];
writeln(a.length); // 5
- smcl 4y agoIs that available at compile time, though?
- alex_muscar 4y agoSomeone on the D subreddit pointed that out as well. I didn't know it was available at compile time. I'll update the post. Thanks.