Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Pascal
for i := Low(elements) to High(elements) do 
  elements[i] := elements[i] * c;

Low() and High() are compiler intrinsics that give the lower and upper bounds of an array (arrays in Pascal need not be zero-based).
for E of elements loop
   E := E * c;
end loop;

New implementation...
< >
Bzzzzzzzzz