Question: Explain how to extend Figure 8.7 to accommodate subroutine arguments that are passed by value, but whose shape is not known until the subroutine is
Explain how to extend Figure 8.7 to accommodate subroutine arguments that are passed by value, but whose shape is not known until the subroutine is called at run time.
![sp- Ada: -- procedure foo (size : integer) is M : array (1..size, 1..size) of long float; Variable-size M part of the frame begin Temporaries ... end foo; Local Pointer to M variables Dope vector Fixed-size part of the frame // C99: void foo (int size) { Bookkeeping double M[size]](https://dsd5zvtm8ll6.cloudfront.net/si.question.images/images/question_images/1606/2/1/1/4125fbcd754e073b1606211412089.jpg)
sp- Ada: -- procedure foo (size : integer) is M : array (1..size, 1..size) of long float; Variable-size M part of the frame begin Temporaries ... end foo; Local Pointer to M variables Dope vector Fixed-size part of the frame // C99: void foo (int size) { Bookkeeping double M[size] [size]; Return address fp- Arguments and returns
Step by Step Solution
3.48 Rating (165 Votes )
There are 3 Steps involved in it
ANS WER To extend Figure 8 7 to accommodate sub r outine arguments that ... View full answer
Get step-by-step solutions from verified subject matter experts
