#### D.2.5.9 pause

Procedure from library `inout.lib` (see inout_lib).

Usage:
  pause([ prompt ]) prompt string

Return:
  none

Purpose:
  interrupt the execution of commands, displays prompt or pause and waits for user input

Note:
  pause is useful in procedures in connection with printlevel to interrupt the computation and to display intermediate results.

Example:

    LIB "inout.lib";
    // can only be shown interactively, try the following commands:
    // pause("press <return> to continue");
    // pause();
    // In the following pocedure TTT, xxx is printed and the execution of
    // TTT is stopped until the return-key is pressed, if printlevel>0.
    // xxx may be any result of a previous computation or a comment, etc:
    //
    // proc TTT
    // { int pp = printlevel-voice+2;  //pp=0 if printlevel=0 and if TTT is
    //    ....                         //not called from another procedure
    //    if( pp>0 )
    //    {
    //       print( xxx );
    //       pause("press <return> to continue");
    //    }
    //     ....
    // }

See also: printlevel; read.

User manual for Singular version 4.4.1, 2025, generated by texi2html.