Hi Alex, OK thx.
For some examples it isn't clear how they should be run. They are not "ready to run" straight away. Since I try to make the examples approachable, I strive to also give the code (and/or data) to make such examples work. In this case I guessed that the example could use STDIN. But I understand your explanation. Thx, Arie 2018-06-08 18:24 GMT+02:00 Alexander Burger <a...@software-lab.de>: > Hi Arie, > > > when (e.g.) executing this code in a terminal, which expects typed > input, I > > can't manage to simulate an EOF in the terminal: > > > > (until (eof) > > (prinl (glue " " (flip (split (line) " ")))) ) > > This is not possible. Standard input cannot be closed, and then continued > in the > REPL. How would you type anything? > > > > I know this should be possible (in Linux) by using ctrl+d. > > However, this forces PicoLisp to a halt! > > Yes. Also in Unix does a ^D terminate the program (eg. 'cat'). > > Note that Unix and also PicoLisp don't have a EOF *character* like DOS or > Windows (^Z). > > Typing ^D on the command line in bash or PicoLisp or whatever is just just > a > convention, and handled in the way that standard input is closed. > > > You need some convention how to stop the loop, eg. > > (while (line) > (prinl (glue ... @ ...) > > which will stop on an empty line. > > Or, you use some end-marker, like the PicoLisp 'here' function does (or > bash > "here" documents). > > > ♪♫ Alex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >