Pref::promptString
-- user
defined ``prompt''Pref::promptString
determines the string, that will be
printed in front of any input line--the ``prompt''.
Pref::promptString( <prompt>)
prompt |
- | string, that contains the ``prompt'', or NIL |
the last defined string
Pref::prompt
, Pref::postInput
, Pref::postOutput
Pref::promptString
changes the user ``prompt''.Pref::postInput
and Pref::postOutput
the ``prompt'' can
be formed alterable (see example 2).Pref::promptString
without arguments returns
the current value. The argument NIL
will reset the default value, which
is »> "
.Prints out the current prompt:
>> Pref::promptString()
">> "
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):