C: #include <climb.h> _save_arg_stack();
PL6: DCL X_SAVE_ARG_STACK ENTRY(0); X_SAVE_ARG_STACK();
"_save_arg_stack" copies all savable descriptors from the Argument Stack to safe storage. Typically, you would do this just before an OCLIMB. You should not call any of the other segment allocation routines (like "_gtseg" or "_frseg") after calling "_save_arg_stack", until you have done a "restore_arg_stack" after returning from the OCLIMB.
It is not an error if you call "save_arg_stack" several times in succession. For example, if you call it explicitly just before leaving a domain, and then the domain exit routine also calls it, you won't run into trouble.
"_save_arg_stack" does not attempt to save unsavable or unknown descriptors. Instead, it saves null descriptors in their place. (For a discussion of unsavable and unknown descriptors, see "expl nsc lib _gtseg".)
C programmers never have to call "_save_arg_stack" explicitly because the C library routines do it for you.
Copyright © 1996, Thinkage Ltd.