What is "Call by content" and "call by reference"?
Answers were Sorted based on User's Feedback
Answer / sruthi
Call by reference means address of var is passed to sub pgm.
The modifications on the passed vars in sub pgm will be
effected in main pgm.
call by content means value of the var is passed to sub pgm.
The modifications on the passed vars in sub pgm will not be
effected in main pgm. that is local to sub pgm.
| Is This Answer Correct ? | 47 Yes | 2 No |
'Call by Content' means value of the variable is passed to
the subprogram and after modification on this variable in
sub-program will not effected in main program.
'Call by Address' is opposite to above. Here address of the
variable is pass to the sub-program at the time of call and
modification on this passed variable in sub-prog will be
effected in main program.
| Is This Answer Correct ? | 12 Yes | 2 No |
Answer / shiva
call by reference passes address of variable to the subprogram
and any changes to this variable will affect the main program
this is bcoz they have allocated the same memory..
whereas in call by content the value of the variable is
passed to the subprogram and any changes to that variable
does not affect the main pprogram..this is bcoz they have
allocated seperate memories.......
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / siri
CALL BY CONTENT CALL BY VALUE
---------------- ------------------
*CALL 'SUB1' BY USING CONTENT *CALL 'SUB1' BY USING REFERE
WS-VAR1 NCE WS-VAR2
*ITS NEED TO BE CODE PASS AN *ITS NO NEED TO CODE PASS AD
ELEMENT BY VALUE. DRESS ON THE VARIABLE.
*THE SUBPROGRAMS MODIFICATIONS *THE SUB PROGRAM MODIFICATIO
ON THE PASSED ELEMENTS ARE NOT NS ON THE PASSED ELEMENTS
VISIBLE IN THE MAIN PROGRAM. ARE VISIBLE IN THE MAIN PRO
GRAM.
| Is This Answer Correct ? | 0 Yes | 0 No |
How many bytes do a s9 (7) comp-3 field occupy?
What is the difference between subscript and index?
What are all the divisions of a COBOL program?
what is call by value and call by reference ?
3 Answers Infosys, ITC Indian Tobacco Company,
can we read in input the file with a variable length ? please , how ..could you help me ?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
What is the difference between structured cobol programming and object alternativelyiented cobol?
How to convert bunch of words in a line to relvant ASCII values?
What is the purpose of Identification Division?
copy 100 records without using ibm utilities
01 a pic 9(9v99) 01 b pic 9(9.99) wht will be the stored vales in both cases
if you give cylinder(1,1)how many cylinders it will be allocate?