From bug-octave-request at bevo dot che dot wisc dot edu Fri Dec 15 19:23:27 2000 Subject: index.m doesn't handle empty strings From: "John W. Eaton" To: Teemu Ikonen Cc: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 15 Dec 2000 19:23:20 -0600 On 11-Aug-2000, Teemu Ikonen wrote: | Current version of string function index returns | error ("index: arguments cannot be string arrays"); | when given empty string as an argument. The correct behavior would be | (IMHO) to return 0. Patch correcting this is included. Sorry for the long delay. I made this change in the CVS sources. Thanks, jwe | --0-1111068335-966005819=:8144 | Content-Type: TEXT/PLAIN; charset=US-ASCII; name="index.patch" | Content-Transfer-Encoding: BASE64 | Content-ID: | Content-Description: | Content-Disposition: attachment; filename="index.patch" | | KioqIGluZGV4Lm0ub3JpZwlXZWQgSnVsIDE5IDE1OjQ0OjAxIDIwMDANCi0t | LSBpbmRleC5tCUZyaSBBdWcgMTEgMTY6Mzk6MjUgMjAwMA0KKioqKioqKioq | KioqKioqIGZ1bmN0aW9uIG4gPSBpbmRleCAocywgdCkNCioqKiA0OCw1MyAq | KioqDQotLS0gNDgsNTcgLS0tLQ0KICAgICAgW25yX3MsIGxfc10gPSBzaXpl | IChzKTsNCiAgICAgIFtucl90LCBsX3RdID0gc2l6ZSAodCk7DQogIA0KKyAg | ICAgaWYgKG5yX3MgPT0gMCB8fCBucl90ID09IDApDQorICAgICAgICAgcmV0 | dXJuDQorICAgICBlbmRpZg0KKyANCiAgICAgIGlmIChucl9zICE9IDEgfHwg | bnJfdCAhPSAxKQ0KICAgICAgICBlcnJvciAoImluZGV4OiBhcmd1bWVudHMg | Y2Fubm90IGJlIHN0cmluZyBhcnJheXMiKTsNCiAgICAgIGVuZGlmDQo= | --0-1111068335-966005819=:8144-- ------------------------------------------------------------- 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 -------------------------------------------------------------