InputString bug, NeXT
- To: mathgroup at yoda.physics.unc.edu
- Subject: InputString bug, NeXT
- From: Garth Payne <pan at math.psu.edu>
- Date: Wed, 18 Nov 92 11:15:32 -0500
I am having trouble with the commands Input[] and InputString[]
when using the NeXT front end for Mathematica. Both commands
cause Mathematica to crash--front end, kernel, and all. I have
tried both Mathematica 1.2 on a NeXT with Operating System 2.0
and Mathematica 2.1 on a NeXT with Operating System 2.1.
Input[] and InputString[] prompt for input with a dialog box.
After I enter some text and press return, Mathematica 1.2 crashes
about one in ten times. Mathematica 2.1 crashes less often. In
10 minutes of testing with the loop below, I made Mathematica
2.1 crash twice. Strings of one character seem to be especially
likely to cause a crash of Mathematica 1.2. The problem only
occurs if I use the NeXT front end; not if I run Mathematica
in a shell with the command "math".
Is there a work-around? What I really want is a function that
behaves like InputString[] but doesn't wait for a newline;
the function would reasonably be called InputCharacter[].
A good way to test Input[] and InputString[] is with the loops
x=Input[];
While[If[x!=q,True,False,True],x=Input[];]
and
x=InputString[];
While[x!="q",x=InputString[];]
In the case of Mathematica 2.0, it's a good idea to turn off
spell-checking first with the command Off[General::spell1].
Garth Payne