changeset 16934:48f5b993b819

doc: Use parentheses around if, switch conditions in documentation. * doc/interpreter/stmt.txi, doc/interpreter/vectorize.txi, examples/@FIRfilter/subsref.m: Use parentheses around if, switch conditions in documentation.
author Rik <rik@octave.org>
date Tue, 09 Jul 2013 14:16:35 -0700
parents e39f00a32dc7
children a7b2fc7fe1a9
files doc/interpreter/stmt.txi doc/interpreter/vectorize.txi examples/@FIRfilter/subsref.m
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/stmt.txi	Tue Jul 09 14:04:05 2013 -0700
+++ b/doc/interpreter/stmt.txi	Tue Jul 09 14:16:35 2013 -0700
@@ -259,7 +259,7 @@
 
 @example
 @group
-switch @var{expression}
+switch (@var{expression})
   case @var{label}
     @var{command_list}
   case @var{label}
@@ -288,7 +288,7 @@
 @example
 @group
 A = 7;
-switch A
+switch (A)
   case @{ 6, 7 @}
     printf ("variable is either 6 or 7\n");
   otherwise
--- a/doc/interpreter/vectorize.txi	Tue Jul 09 14:04:05 2013 -0700
+++ b/doc/interpreter/vectorize.txi	Tue Jul 09 14:16:35 2013 -0700
@@ -112,7 +112,7 @@
 @example
 @group
 for i = 1:n
-  if a(i) > 5
+  if (a(i) > 5)
     a(i) -= 20
   endif
 endfor
--- a/examples/@FIRfilter/subsref.m	Tue Jul 09 14:04:05 2013 -0700
+++ b/examples/@FIRfilter/subsref.m	Tue Jul 09 14:16:35 2013 -0700
@@ -1,5 +1,5 @@
 function out = subsref (f, x)
-  switch x.type
+  switch (x.type)
     case "()"
       n = f.polynomial;
       out = filter (n.poly, 1, x.subs{1});