Results codes from the last paging pause.
These provide information on what user's request at the last paging pause (the Nonstop/Quit/Continue/Step message you get when a message won't fit the screen).Of these constants, the most important one is PAUSE_QUIT. You should test this when printing large lists or tables with loops. The output library will interrupt the message currently printed when the user hits `Q', but there is no way for the library to know what you are doing. Use something like this:
if (fmt_lastresult == PAUSE_QUIT) { prompt (LISTCANCEL); break; }Otherwise, the user will be able to interrupt individual messages from being printed, but not your entire listing or tabulation loop. It is a good convention to print something like `this listing was aborted' (prompt LISTCANCEL in this case) after doing this so that users will later know the entire list has not been shown.
Anyway, here are the defined values:
- PAUSE_NONSTOP
- The user selected non-stop operation. No further paging breaks will be issued until the next request for user input.
- PAUSE_QUIT
- The user interrupted the list. If you are currently printing a list, table, or generally issuing many messages in a loop, you should break out of the loop, notify the user of the interruption and return the user to the previous menu.
- PAUSE_CONTINUE
- The simply requested a continuation of the list.
You'll notice that there is no result code for the `Step' command. This is because stepping is handled within the formatter, not the pager.