Re: Problem with string index for substrings a position zero (a bug?)

2016-01-31 Thread Tom Browder
On Friday, July 3, 2015, Tom Browder wrote: > On Fri, Jul 3, 2015 at 7:35 AM, Tom Browder wrote: > > On Fri, Jul 3, 2015 at 7:21 AM, yary wrote: > >> On Fri, Jul 3, 2015 at 8:07 AM, Tom Browder wrote: > >

Re: Problem with string index for substrings a position zero (a bug?)

2015-07-03 Thread Tom Browder
On Fri, Jul 3, 2015 at 7:35 AM, Tom Browder tom.brow...@gmail.com wrote: On Fri, Jul 3, 2015 at 7:21 AM, yary not@gmail.com wrote: On Fri, Jul 3, 2015 at 8:07 AM, Tom Browder tom.brow...@gmail.com wrote: ... So, considering all the comments and S32 wording, I suspect that this would be

Re: Problem with string index for substrings a position zero (a bug?)

2015-07-03 Thread Tom Browder
On Fri, Jul 3, 2015 at 7:40 AM, yary not@gmail.com wrote: On Fri, Jul 3, 2015 at 8:35 AM, Tom Browder tom.brow...@gmail.com wrote: if $idx = 0 { ... Which worked also (surprisingly given S32 and your comments)! That doesn't work when the line has no comment in it, it gives an error

Problem with string index for substrings a position zero (a bug?)

2015-07-03 Thread Tom Browder
I originally had problems with the S32 description of string function index. S32 says that if the substring is not found then a bare Int is returned which evaluates to false, otherwise an Int with the position of the first substring match is returned. It goes on to say that one should not evaluate