| Functions | ![]() |
FUNCTION add_bits (a, b : IN BIT) RETURN BIT IS
BEGIN -- functions can NOT return multiple values
RETURN (a XOR b);
End add_bits; |
FUNCTION add_bits2 (a, b : IN BIT) RETURN BIT IS VARIABLE result : BIT; -- variable is local to function BEGIN result := (a XOR b); RETURN result; -- the two functions are equivalent END add_bits2;
|
|
|
|
|
|
|
| ![]() |