What is the difference between call by context and call by reference?

Showing Answers 1 - 6 of 6 Answers

kiran.r

  • Jan 2nd, 2008
 

call by context:
      if there is any modifications in sub prograam,it wont effect on main program.
call by reference:
      if there is any modifications in sub prograam,it will effect on mainprogram.

  Was this answer useful?  Yes

Call by content : If we change formal arguments (variables used in sub program), their corresponding actual arguments (variables used in main) will not be changed.
ex ) CALL   'subprg' USING BY CONTENT  A, B, C.

Call by reference : If we change formal arguments (variables used in sub program), their corresponding actual arguments (variables used in main) will also be changed.
Call by reference is default.
ex ) CALL   'subprg' USING BY REFERENCE  A, B, C.
                   (OR)
      CALL   'subprg' USING A, B, C.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions