STRCAT is not compatible

Ben Abbott bpabbott at mac.com
Thu Feb 21 21:33:26 CST 2008


On Feb 21, 2008, at 3:04 PM, John W. Eaton wrote:

> On 21-Feb-2008, Ben Abbott wrote:
>
> | Crazy question; Is there convenient method to determine where
> | strcat() is used by Octave?
>
>  find . -name '*.m' | xargs grep 'strcat *('
>
> | This feature can be repaired with some simple editing. For example,
> |
> | octave:123> strcat({"foo "},{"bar"}){1}
> | ans = foo bar
>
> Ugh.  I think I'd prefer to define a cstrcat function that behaves
> like Octave's strcat does now.  Another option is to use [] to
> concatenate character strings, though I prefer limiting that to
> building numeric arrays.
>
> jwe

After looking over the number of files impacted, I'm inclined to use  
sed to modify all the files in one go.

Once the global search-&-replace was completed, strcat.m would be  
renamed to cstrcat.m and the new strcat.m could be added to the project.

Admittedly this is a transparent strategy to reduce effort (and  
errors) ;-)

Thoughts?

Ben


More information about the Bug-octave mailing list