octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mercurial in OS 10.4.11 (was imread/imwrite)


From: dbateman
Subject: Re: mercurial in OS 10.4.11 (was imread/imwrite)
Date: Fri, 20 Jun 2008 15:06:18 -0700 (PDT)



Jaroslav Hajek-2 wrote:
> 
> Okay, so what about the following? It's the "good old way", using only
> index and substr.
> This should definitely be POSIX compatible...
> 

snip



> @@ -490,7 +497,11 @@
>  /BEGIN_PROPERTIES\(.*\)/ {
>    gather = 1;
>    idx = 0;
> -  class_name = gensub (/^.*BEGIN_PROPERTIES\((.*)\)/, "\\1", "g");
> +  str = $0;
> +  k = index (str, "BEGIN_PROPERTIES(");
> +  str = substr (str, k + 17);
> +  l = index (str, ")");
> +  class_name = substr (str, 1, l-1);
>    next;
>  }
> 

Doesn't the "g" in the gensub command mean "global" so I expect you also
need a loop for the above.

D.

-- 
View this message in context: 
http://www.nabble.com/imread-imwrite-tp18018475p18038201.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]