Reading whitespace separated strings from stdin?

TheGag96 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Apr 22 07:29:28 PDT 2015


On Tuesday, 21 April 2015 at 03:44:16 UTC, weaselcat wrote:
> snip

Wow, that's a damn good solution... I didn't know that readln() 
could take an argument that it stops at once it finds.

Now the thing is, this program is supposed to be a reverse Polish 
notation calculator. A human using this program would probably be 
confused as to why nothing happens when they hit enter after a 
line -- it only really works in the context of copying and 
pasting the whole input in. Still a really neat solution to know 
anyhow. Thanks!


More information about the Digitalmars-d-learn mailing list