Mercurial > hg > octave-terminal
changeset 7721:9369589f2ba5
disp: produce sq-string unless arg is a dq-string
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 18 Apr 2008 11:57:32 -0400 |
parents | 4e2eafef689c |
children | c3bb0b7a4261 |
files | src/ChangeLog src/pr-output.cc |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-04-18 John W. Eaton <jwe@octave.org> + + * pr-output.cc (Fdisp): If nargout > 0, produce an sq-string + unless arg is a dq-string. + 2008-04-17 John W. Eaton <jwe@octave.org> * parse.y (looks_like_copyright): Handle leading whitespace.
--- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -2807,9 +2807,10 @@ args(0).print (octave_stdout); else { + octave_value arg = args(0); std::ostringstream buf; - args(0).print (buf); - retval = buf.str (); + arg.print (buf); + retval = octave_value (buf.str (), arg.is_dq_string () ? '"' : '\''); } } else