Hi Markus;
Sorry, I did not understand at first what you wanted. Hence, my one word response, UNCAT, was not what you were looking for. I have a solution for you; however before presenting it, let me tell you why I came up with the solution.
Years ago, I had an annoying problem. I teach Natural classes. I teach them “live”; that is I run code, not display powerpoints. Suppose I have a program, PROG1, in the editor. A student asks a question. To answer the question, I make a couple of changes to PROG1. Then I SAVE PROG2. Then I type R (I am a lazy typist). Perhaps another student suggests a change to the code. I make the change and type SA. WHOOPS. I have just overwritten PROG1, not PROG2. When you do SAVE PROG2, the name that appears at the top of the editing area is still PROG1.
I decided that what Natural needed was a SAVE AS editor command as well as SAVE. What to do? I created a simple program, called XX, shown below (it must be STOW’ed, not just SAVE’d):
DEFINE DATA LOCAL
1 #NAME (A8 )
END-DEFINE
*
INPUT #NAME
STACK TOP COMMAND ‘EDIT’ #NAME
STACK TOP COMMAND ‘SAVE’ #NAME
END
If I have PROG1 in the editor, and type the command XX PROG2, I am now working with PROG2 in the editor, not PROG1. This made life a lot simpler for me. I no longer destroyed programs in my teaching library.
What does this have to do with your problem? You can create a program like:
DEFINE DATA LOCAL
1 #NAME (A8 )
END-DEFINE
*
INPUT #NAME
STACK TOP COMMAND ‘STOW’
STACK TOP COMMAND ‘UNCAT’ #NAME
END
Call the program whatever you want (as a lazy typist I suggest a two character name like UN).
Now suppose you are working in the editor with PROG1. You type UN PROG1. The object code for PROG1 will disappear. The source code for PROG1 will be the “old” version of PROG1 (prior to any changes you made without saving). Of course, you can type SA to simply make the library source code the same as the program editor.
Natural can be a lot of fun to work with