From bug-octave-request at bevo dot che dot wisc dot edu Wed May 22 13:58:26 2002 Subject: Re: hack of menu.m From: Mirek Kwasniak To: Schloegl Alois Cc: bug-octave at bevo dot che dot wisc dot edu Date: Wed, 22 May 2002 20:56:41 +0200 On Tue, May 21, 2002 at 09:19:25PM +0200, Schloegl Alois wrote: > menu does not return selected value but produces error message and repeats > display of the selection. > > > octave:3> K = menu('title','s1','s2','s3') > title > > [ 1] s1 > [ 2] s2 > [ 3] s3 > > pick a number, any number: 1 > > error: input invalid or out of range > > [ 1] s1 > [ 2] s2 > [ 3] s3 > > > > The following hack is a quick solution, not necessarily the best. I observed this in 2.1.35cvs but I use now 2.1.36 from Debian and: octave2.1:6> s = input ("pick a number, any number: ", "s"); pick a number, any number: 1 octave2.1:7> size(s) ans = 1 1 :) Mirek ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------