[changeset] make str2mat an alias of char

Thorsten Meyer thorsten.meyier at gmx.de
Tue Dec 2 15:10:55 CST 2008


Thorsten Meyer wrote:
> dbateman at fladenmuller.org wrote:
>> Looking at 
>>
>> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/str2mat.html
>>
>> it seems that str2mat is considered as obselete. I'd therefore be 
>> inclined to move str2mat to scripts/deprecated but written as something
>> like
>>
>> function varargout = str2mat (varargin)
>>   persistent warned = false;
>>   if (! warned)
>>     warned = true;
>>     warning ("Octave:deprecated-function",
>>              "str2mat is obsolete and will be removed from a future 
>> version of Octave; please use char instead");
>>   endif
>>
>>   varargout = cell (nargout, 1);
>>   [ varargout{:} ] = char (varargin{:});
>>
>> endfunction
>>
>>
> Fine with me. See the attached patch (had to replace varargout by a fixed output
> argument to keep behaviour on the command line).
> 
> Thorsten
> 
and again with fixed ChangeLog entries.

Thorsten

-------------- next part --------------
A non-text attachment was scrubbed...
Name: deprecate_str2mat_2.patch
Type: text/x-patch
Size: 10895 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20081202/a1340e85/attachment.bin 


More information about the Octave-maintainers mailing list