octave-maintainers
[Top][All Lists]
Advanced

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

Re: strjoin change ramifications with escape sequence behavior


From: Stefan Mahr
Subject: Re: strjoin change ramifications with escape sequence behavior
Date: Sun, 16 Jun 2013 00:45:41 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

> I see a recent mod in the source tree for the script strjoin.m.  Could
> you please look at this again and consider if your change alters the
> behavior of the routine?  I'm not sure what the routine is supposed to
> do exactly, but I'm just noting that sprintf() has varied behavior for
> the way "escape" sequences are handled.  For example:
> 
> Before change:
> 
>>> strjoin({"Octave","Scilab"}, "\n")
> ans = Octave
> Scilab
> 
> After change:
> 
>>> strjoin({"Octave","Scilab"}, "\n")
> ans = Octave

Sorry, I can't reproduce your behavior. Your example is working fine
here, same result like with sprintf.

> John, perhaps you could look this one over as well.  I'm just curious
> why inside the Octave script displaying [cstr(:).'; delimiter(:).']{:}
> results in the following:
> 
> ans = Octave
> ans =
> 
> ans = Scilab
> ans =

That's true for your command above, but you need the extra brackets to
join the results:

[[cstr(:).'; delimiter(:).']{:}]

> while the return value after Stefan's change shows only the first
> portion of that result.  I guess a routine can't return multiple answers.

I think you lost the additional brackets, but no idea why.


Stefan



reply via email to

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