[mod.computers.vax] Yet another TPU bug

carl@CITHEX.CALTECH.EDU.UUCP (03/01/87)

The following is a reconstruction of a TPU session, invoked with the command
	$ EDIT/TPU/NODISPLAY/COMMAND=TT:/NOSECTION
The commands I typed are flagged by a leading "> "; TPU's responses are
flagged with a leading "< ".  Commented lines (beginning with "! " were
added later to clarify what's going on.
********************************************************************************
! Compile a simple procedure (fubar), storing the program in fubar_1.
> fubar_1:=compile("procedure fubar(fubar_arg) message(fubar_arg); endprocedure");
! Test the procedure
> fubar("This is a test.");
< This is a test.
! Redefine the procedure, with an intentional error:  I try to use a built-in
! 	as tha target for an assignment statement; any procedure, whether
! 	built-in or user-defined, would have had the same effect.
> fubar_2:=compile("procedure fubar(fubar_arg) quit:=1; endprocedure");
< %TPU-I-SUPERSEDED, Definition of FUBAR superseded at line 1
< %TPU-E-BADASSIGN, Target of the assignment at line 1 cannot be a function/keyword
< %TPU-W-COMPILEFAIL, Compilation aborted at line 1
! demonstrate that the procedure has, indeed, been superseded (one would
	assume, with nothing, since the compilation failed),
> fubar("This is a test.");
< %TPU-E-UNDEFINEDPROC, Undefined procedure call FUBAR at line 1
! but the procedure call ISN'T undefined, as we see when we try to redefine
! 	with the original definition, which worked fine earlier.
> fubar_3:=compile("procedure fubar(fubar_arg) message(fubar_arg); endprocedure");
< %TPU-I-SUPERSEDED, Definition of FUBAR superseded at line 1
< %TPU-W-COMPILEFAIL, Compilation aborted at line 1
! Now, TPU claims to have superseded the bad definition with the good one,
!	though the compilation aborted.  We find that we've still got a
!	problem.
> fubar("This is a test.");
< %TPU-E-UNDEFINEDPROC, Undefined procedure call FUBAR at line 1
! So, we can't supersede the definition; Well, we can't delete a procedure;
!	so maybe we can set it to zero and recover?
> fubar:=0
< Target of the assignment at line 1 cannot be a function/keyword
! Well, how about if we try to delete the program (since you can't delete a
! 	procedure)?
> delete(fubar_3);
< %TPU-E-ARGMISMATCH, Data type of first argument unsupported for built-in at line 1
! That's also a no-go. Well, maybe the program's still hanging around in
!	one of its previous incarnations.  Delete them too.
> delete(fubar_1);
< %TPU-E-ARGMISMATCH, Data type of first argument unsupported for built-in at line 1
> delete(fubar_3);
< %TPU-E-ARGMISMATCH, Data type of first argument unsupported for built-in at line 1
! They're not there either, so give up
> exit;
********************************************************************************
Now for the question:  Is there any way to get rid of this undefined procedure
call (Yes, I know that "getting rid an undefined whatever" doesn't really
make much sense gramatically, but on the other hand, having TPU tell me
that I've superseded the definition of an undefined procedure isn't much
better). Does anybody out there know enough about TPU internals to be able
to tell me what's being left defined when it shouldn't be?