CS 3304: Comparative Languages |
Subprograms |
[ Course Documents ] : [ Subprograms ] | ||||||||
|
function "*"(a, b : in Vector_Type) return Integer is sum : Integer := 0; begin for index in a'range loop sum := sum + a(index) * b(index); end loop; return sum; end "*";