BYREF sticks until BYVAL
Level 3: Parameters. The keyword is not per parameter. It stays in force for the rest of the list, which is the mistake in a two-parameter procedure.
Update should change the first argument to 100 and leave the second alone.
Both parameters are currently references, so B becomes 100 as well. Switch the second parameter back to by value.
Output must be:
100
2
- Previous: SWAP needs BYREF
- Next: A function returns a copy
- AS & A Level Path