Answer to question 26

The question was related to following procedures:

 /* Procedure A */            |  /* Procedure B */
 address command              |  address command
 oldqueue=queued()            |  parse pull fn ft fm .
                              |  'MAKEBUF' ; buffer=rc
 'MAKEBUF' ; buffer=rc        |  'IDENTIFY (STACK'
 'LISTFILE PROFILE * (STACK'  |  parse pull userid . nodeid .
 do queued()-oldqueue         |  'QUERY DISK R/W (STACK'
    parse pull fileid         |  pull .      /* get rid of header */
    'EXEC B' fileid           |  parse pull . . FirstRWMode .
 end                          |  if ft=userid then call errexit
 EXIT:                        |
 'DROPBUF' buffer             |  ...        /* process file */
 exit                         |  exit
                              |  ERREXIT:
                              |  'DROPBUF' buffer
                              |  exit

As one never knows how many stack buffers were created before procedure A was called, the correct answer to the question is the value of variable buffer in procedure B is one more than the value of buffer in procedure A.

Note as well that, at the end of procedure A, no records will remain in the stack, whatever procedure B may have caused.

Use backward navigation to return to the lesson text.