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]

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

1 Expert Approved Answer
Step: 1 Unlock

ANS WER To extend Figure 8 7 to accommodate sub r outine arguments that ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Language Pragmatics Questions!