mercurial in OS 10.4.11 (was imread/imwrite)

John W. Eaton jwe at bevo.che.wisc.edu
Mon Jun 23 10:52:48 CDT 2008


On 20-Jun-2008, Jaroslav Hajek wrote:

| On Fri, Jun 20, 2008 at 10:28 PM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
| 
| > The AWK book only documents a two-argument version of match, but notes
| > that it sets RSTART and RLENGTH.  I see that mawk fails for this:
| >
| >  echo "foo bar baz" | mawk '{match ($0, /^foo ([^ ]*)/, res); print res[1]; }'
| >  mawk: line 1: syntax error at or near ,
| >
| > The following doesn't fail, but it doesn't really do the right thing
| > either:
| >
| >  echo "foo bar baz" | gawk '{match ($0, /^foo ([^ ]*)/); print RSTART, RLENGTH; }'
| >  1 7
| >
| > Note RSTART and RLENGTH cover the entire regexp, not just the part in
| > parens.  So I guess something else is needed if you want this to be
| > portable.
| >
| > jwe
| >
| 
| Okay, so what about the following? It's the "good old way", using only
| index and substr.
| This should definitely be POSIX compatible...

I checked it in.

Thanks,

jwe


More information about the Octave-maintainers mailing list