Task

Compute the sum and product of an array of integers.




ARRAY INTEGER($list;0)
For ($i;1;5)
       APPEND TO ARRAY($list;$i)
End for
 
$sum:=0
$product:=1
For ($i;1;Size of array($list))
   $sum:=$var+$list{$i}
   $product:=$product*$list{$i}
End for
 
// since 4D v13
 
$sum:=sum($list)
 