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 |
if you give cylinder(1,1)how many cylinders it will be allocate?
In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference
Define cobol?
can we use full outer join with cursors declared in cobol program?
write a program to eliminate duplicate records in a input file and send them to output file.
i Want All cobol ERROR codes?
how can you identify wheather the program is using search or search all in the cobol program?
Why did you choose to work with ibm mainframe cobol programming?
Write a program to explain size error.
How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?
what is the use of filler in cobol programing?
what is the difference b/w level no.01 & level no.77?