Neither do_menu nor do_readln (in src/main/scan.c) call the function InitConsoleGetchar. They need to do this to reset ConsolePrompt. If you use "scan" to read in data from the terminal, then ConsolePrompt is set to "n:" for some integer n and this prompt makes an unwelcome appearance when you use the "menu" or "readline" functions. Incidentally, could we have a "title" argument and a dummy "graphics" argument for menu? This if for S-PLUS compatibility, if I may dare to raise the topic. Martyn -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
bug in menu, readline
2 messages · Martyn Plummer, Kurt Hornik
Martyn Plummer writes:
Neither do_menu nor do_readln (in src/main/scan.c) call the function InitConsoleGetchar. They need to do this to reset ConsolePrompt. If you use "scan" to read in data from the terminal, then ConsolePrompt is set to "n:" for some integer n and this prompt makes an unwelcome appearance when you use the "menu" or "readline" functions.
Incidentally, could we have a "title" argument and a dummy "graphics" argument for menu? This if for S-PLUS compatibility, if I may dare to raise the topic.
Sure. I've already done this in 0.62. -k -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._