6 Sep 07:49
reading a string from keyboard
From: Jussi Eloranta <Jussi.Eloranta <at> csun.edu>
Subject: reading a string from keyboard
Newsgroups: gmane.comp.mathematics.maxima.general
Date: 2008-09-06 05:50:26 GMT
Subject: reading a string from keyboard
Newsgroups: gmane.comp.mathematics.maxima.general
Date: 2008-09-06 05:50:26 GMT
Hi, I just recently noticed that readline(true) (or readline(false)) no longer reads a string from the keyboard (stdin). It used to work before 5.15 - probably this was not the correct way of doing it but couldn't figure out anything else at that time. Note that I want to read a string - not expression. This string can be, for example, a path name which is not a valid expression obviously. After testing a bit, I found out that the following seems to work now: readline(?\*standard\-input\*) where the stream refers to the corresponding lisp stream name that points to standard input. This also works well with wxmaxima (which communicates via pipes I suppose). Is this the right way of doing this? Meaning that is it standard enough that it should work with future maxima releases as well. It might be a good idea to include the pre-existing stream names that are accessible in maxima in the manual - the previous one was not trivial to figure out. Jussi Eloranta Cal State Northridge
RSS Feed