procedure as return value and formal parameter