Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕PR Prompt Replacement
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

⎕PR Prompt Replacement


The System Variable ⎕PR contains the character used to indicate the prompt portion of a input line. The default value is blank. Under normal circumstances, if output is used to place a prompt on a line and input is then used to capture user input, the length of the output prompt is indicated by blanks. ⎕PR can substitute another fill character. For more details see ⍞.

             ⍞←'PLEASE TYPE YOUR NAME : ' ⋄ NAME←⍞
       PLEASE TYPE YOUR NAME : MYNAME
             NAME
                               MYNAME
             ⎕PR←'*'
             ⍞←'PLEASE TYPE YOUR NAME : ' ⋄ NAME←⍞
       PLEASE TYPE YOUR NAME : MYNAME
             NAME
       ************************MYNAME

If ⎕PR is set to an empty vector, then the actual contents of the prompt line are returned.

             ⎕PR←''
             ⍞←'PLEASE TYPE YOUR NAME : ' ⋄ NAME←⍞
       PLEASE TYPE YOUR NAME : MYNAME
             NAME
       PLEASE TYPE YOUR NAME : MYNAME

Topic: APLX Help : Help on APL language : System Functions & Variables : ⎕PR Prompt Replacement
[ Previous | Next | Contents | Index | APL Home ]