diff src/pr-output.cc @ 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 8d6ab12f8fda
children 82be108cc558
line wrap: on
line diff
--- 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