View previous topic :: View next topic
|
Author |
Message |
varun
New User
Joined: 02 Mar 2005 Posts: 11 Location: USA
|
|
|
|
Hi,
can any one explain how u know in a program whether we used call by value or call by reference.pl. explain with example. |
|
Back to top |
|
|
varun
New User
Joined: 02 Mar 2005 Posts: 11 Location: USA
|
|
|
|
Hi senthil,
Thanks for the reply.
can we use both call by value and call by reference in a single call.
if we do not mention any call by reference or value does it take default call by reference or call by value. |
|
Back to top |
|
|
ashok_bln Warnings : 1 New User
Joined: 19 Feb 2005 Posts: 5 Location: bangalore
|
|
|
|
yes i think we can use both call by content and call by reference in single program.
the default is call by reference
regards
ashok |
|
Back to top |
|
|
priya
Moderator
Joined: 24 Jul 2003 Posts: 568 Location: Bangalore
|
|
|
|
Dear Friends,
You can use CALL BY VALUE and CALL BY CONTENT in a single Call statement.
Default is CALL BY REFERENCE, So if you miss anything, it's treated as CALL BY REFERENCE.
Ex: CALL A USING B, C BY CONTENT, D BY REFERENCE. |
|
Back to top |
|
|
varun
New User
Joined: 02 Mar 2005 Posts: 11 Location: USA
|
|
|
|
Hi,
Thanks for helping |
|
Back to top |
|
|
DeepaBala
New User
Joined: 20 Feb 2007 Posts: 13 Location: Trivandrum
|
|
|
|
what is the difference in that two type of calling ?
plz any one clear for me |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
Back to top |
|
|
DeepaBala
New User
Joined: 20 Feb 2007 Posts: 13 Location: Trivandrum
|
|
|
|
Thank u |
|
Back to top |
|
|
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 154 Location: The Netherlands
|
|
|
|
Deepbala,
Quote: |
how to rectify file status 39 |
I this ur signature???????... I thought it was a question that u asked and had replied in my prev post.
Funny Signature ya..
Thamilzan. |
|
Back to top |
|
|
sachin_star3 Warnings : 1 New User
Joined: 30 Sep 2006 Posts: 78 Location: pune
|
|
|
|
answer
call by reference and call by value are types of static call
if you look in calling programme then
1] for call by reference : in procedure division there is mntion verb USING REFERENCE OR not mention because it is in default
2] for call by content (value ): in procedure division there compulsory mention the verb USING CONTENT
I GIVEN YOU EXAMPLES
EXAMPLE1.CALL BY CONTENT
ID DIVISION
PROGRAM-ID. XXX.
WORKING-STORAGE SECTION.
LINKAGE SECION.
77 A PIC 9(2).
77 B PIC 9(4).
77 C PIC 9(6).
PROCEDURE DIVISION USING CONTENT OF A, B, C.
COMPUTE C = A + B
DISPLAY C
EXAMPLE2.CALL BY REFERENCE
ID DIVISION
PROGRAM-ID. XXX.
WORKING-STORAGE SECTION.
LINKAGE SECION.
77 A PIC 9(2).
77 B PIC 9(4).
77 C PIC 9(6).
PROCEDURE DIVISION USING REFERENCE OF A, B, C.
COMPUTE C = A + B
DISPLAY C |
|
Back to top |
|
|
|