Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Pascal

Idiom #314 Fill array with value

Set all the elements in the array x to the same value v

for i := Low(x) to High(x) do x[i] := v;
#include <array>
x.fill(v);

New implementation...