Previous Page Next Page Contents

Pref::promptString -- user defined ``prompt''

Introduction

Pref::promptString determines the string, that will be printed in front of any input line--the ``prompt''.

Call(s)

Pref::promptString( <prompt>)

Parameters

prompt - string, that contains the ``prompt'', or NIL

Returns

the last defined string

Related Functions

Pref::prompt, Pref::postInput, Pref::postOutput

Details

Example 1

Prints out the current prompt:

>> Pref::promptString()
                                   ">> "

Example 2

Pref::promptString will be used to numerate the input lines in joint with Pref::postInput. I.e., after each input the variable NumberOfLine will be incremented. The variable NumberOfLine must be initialized with 0. (This all could be done in the file ``userinit.mu''.)

>> NumberOfLine:= 0:
   Pref::postInput(proc()
                   begin
                     NumberOfLine:= NumberOfLine + 1;
                     Pref::promptString(expr2text(NumberOfLine) . " >> ")
                   end_proc):

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000