diff libinterp/corefcn/file-io.cc @ 20076:dbf2418a46dd

Document expansion of escape sequences in single quotes (bug #44745). * io.txi: Note that all *printf functions expand escape sequences. * error.cc (Ferror, Fwarning): Note that escape sequences are expanded. * file-io.cc (Fprintf, Ffprintf, Fsprintf): Note that escape sequences are expanded. * regexp.cc (Fregexp, Fregexprep): Note that escape sequences are expanded.
author Rik <rik@octave.org>
date Tue, 07 Apr 2015 21:18:22 -0700
parents 19755f4fc851
children 1f9ed81bd173
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc	Tue Apr 07 18:29:01 2015 -0700
+++ b/libinterp/corefcn/file-io.cc	Tue Apr 07 21:18:22 2015 -0700
@@ -888,6 +888,10 @@
 function exactly equivalent to @code{printf}.\n\
 \n\
 The optional output returns the number of bytes written to the file.\n\
+\n\
+Implementation Note: For compatability with @sc{matlab}, escape sequences in\n\
+the template string (e.g., @qcode{\"\\\\n\"} => newline) are expanded even\n\
+when the template string is defined with single quotes.\n\
 @seealso{fputs, fdisp, fwrite, fscanf, printf, sprintf, fopen}\n\
 @end deftypefn")
 {
@@ -954,6 +958,10 @@
 See the Formatted Output section of the GNU Octave manual for a\n\
 complete description of the syntax of the template string.\n\
 @end ifclear\n\
+\n\
+Implementation Note: For compatability with @sc{matlab}, escape sequences in\n\
+the template string (e.g., @qcode{\"\\\\n\"} => newline) are expanded even\n\
+when the template string is defined with single quotes.\n\
 @seealso{fprintf, sprintf, scanf}\n\
 @end deftypefn")
 {
@@ -1059,6 +1067,10 @@
 suitably sized string as an argument, Octave's @code{sprintf} function\n\
 returns the string, automatically sized to hold all of the items\n\
 converted.\n\
+\n\
+Implementation Note: For compatability with @sc{matlab}, escape sequences in\n\
+the template string (e.g., @qcode{\"\\\\n\"} => newline) are expanded even\n\
+when the template string is defined with single quotes.\n\
 @seealso{printf, fprintf, sscanf}\n\
 @end deftypefn")
 {