bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Is this output incorrect?


From: Peter Teeson
Subject: Re: [Bug-apl] Is this output incorrect?
Date: Sun, 01 Jun 2014 19:19:51 -0400

Thanks Jürgen for correcting my comment.
You've prompted me to browse through my venerable copy of Josuttis' The C++ 
Standard Library.
 
respect…

Peter

On 2014-06-01, at 8:00 AM, Juergen Sauermann <address@hidden> wrote:
> Hi Peter,
> 
> almost correct. The first comment should be "// may point to an optional 
> string typically containing 6 spaces".
> prompt can be 0 and then no prompt is printed. Otherwise the function pushes 
> the prompt (backwards)
> back into stdin. Whether that works is a matter of the underlying operating 
> system. The man page
> of ungetc() says that only 1 ungetc() char is guaranteed but we push 6. 
> Another question is whether
> an ungetc() into stdin will occur on C++ cin?
> 
> The main use case for this were scripts where it does not matter too much if 
> a prompt is printed
> or not. Note also that pushing chars back into stdin has a different effect 
> than just printing the prompt
> - there are  cases where the prompt should be editable (⍞ I believe).
> 
> /// Jürgen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]