On Sun, Oct 11, 2020 at 01:26:13PM +, Alaindevos via Digitalmars-d-learn
wrote:
> Sidenote, sort also not works with static arrays.
Just slice it with [].
T
--
I think the conspiracy theorists are out to get us...
Sidenote, sort also not works with static arrays.
On Sunday, 6 December 2015 at 12:27:49 UTC, cym13 wrote:
On Sunday, 6 December 2015 at 12:23:05 UTC, Tim K. wrote:
Hi! I have the following code:
int main(string[] argv)
{
import std.algorithm: sum;
import std.stdio: writeln;
uint[3] a1 = [1, 2, 3];
uint
On Sunday, 6 December 2015 at 12:27:49 UTC, cym13 wrote:
A static array is a value type so it is passed by value to
functions.
Oh, right, I totally forgot about that. Thank you for reminding
me.
And yes, I was not planning on doing that. I just have a local
fixed-size array that I wanted to g
On Sunday, 6 December 2015 at 12:23:05 UTC, Tim K. wrote:
Hi! I have the following code:
int main(string[] argv)
{
import std.algorithm: sum;
import std.stdio: writeln;
uint[3] a1 = [1, 2, 3];
uint[] a2;
for (int i = 1; i <= 3; ++i)
a2
06.12.2015 15:23, Tim K. пишет:
Hi! I have the following code:
int main(string[] argv)
{
import std.algorithm: sum;
import std.stdio: writeln;
uint[3] a1 = [1, 2, 3];
uint[] a2;
for (int i = 1; i <= 3; ++i)
a2 ~= i;
w
Hi! I have the following code:
int main(string[] argv)
{
import std.algorithm: sum;
import std.stdio: writeln;
uint[3] a1 = [1, 2, 3];
uint[] a2;
for (int i = 1; i <= 3; ++i)
a2 ~= i;
writeln("a1: ", sum(a1));
writeln("