Logo

Programming-Idioms

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

Idiom #314 Fill array with value

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

x = v

This is an array assignment with a scalar value.
#include <array>
x.fill(v);

New implementation...