# HG changeset patch # User John W. Eaton # Date 1208534252 14400 # Node ID 9369589f2ba5dd56c9c0b3d3db1b802ed51d96c4 # Parent 4e2eafef689cbfa417edd52fa1fcd43a8e60c7e8 disp: produce sq-string unless arg is a dq-string diff -r 4e2eafef689c -r 9369589f2ba5 src/ChangeLog --- a/src/ChangeLog Thu Apr 17 16:44:49 2008 -0400 +++ b/src/ChangeLog Fri Apr 18 11:57:32 2008 -0400 @@ -1,3 +1,8 @@ +2008-04-18 John W. Eaton + + * pr-output.cc (Fdisp): If nargout > 0, produce an sq-string + unless arg is a dq-string. + 2008-04-17 John W. Eaton * parse.y (looks_like_copyright): Handle leading whitespace. diff -r 4e2eafef689c -r 9369589f2ba5 src/pr-output.cc --- a/src/pr-output.cc Thu Apr 17 16:44:49 2008 -0400 +++ b/src/pr-output.cc Fri Apr 18 11:57:32 2008 -0400 @@ -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