Thursday, December 20, 2007

What are the different methods of passing data?

Calling by reference: During a subroutine call, only the address of the actual parameter is transferred to the formal parameters. The formal parameter has no memory of its own, and we work with the field of the calling program within the subroutine. If we change the formal parameter, the field contents in the calling program also change.

Calling by value: During a subroutine call, the formal parameters are created as copies of the actual parameters. The formal parameters have memory of their own. Changes to the formal parameters have no effect on the actual parameters.

The method by which internal tables are passed is By Reference.

No comments:

Blog Archive