tpc errors saying "'return' can be used only in a subprogram"
However, the Turing Report on pg. 33 says return "causes immediate return from a program or a procedure" so it should be allowed at the toplevel to exit a program. I checked the Turing Plus Report and it doesn't mention any changes regarding that statement's semantics.
For the following trivial program:
tpc errors saying "'return' can be used only in a subprogram"
However, the Turing Report on pg. 33 says return "causes immediate return from a program or a procedure" so it should be allowed at the toplevel to exit a program. I checked the Turing Plus Report and it doesn't mention any changes regarding that statement's semantics.