From: Robert D. <rob...@us...> - 2007-06-30 19:10:47
|
Update of /cvsroot/maxima/maxima/doc/info In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24695/doc/info Modified Files: Expressions.texi Input.texi Rules.texi Log Message: Change all examples which make use of "@" as an operator to something else (e.g. "@@" or "##"). The operator "@" is used by the defstruct code which is now built-in, so "@" in examples conflicted with that. Examples in texinfo files in languages en, de, es, pt, and pt_BR have been changed. Index: Expressions.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/Expressions.texi,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- Expressions.texi 27 May 2007 17:44:18 -0000 1.53 +++ Expressions.texi 30 Jun 2007 19:10:41 -0000 1.54 @@ -421,46 +421,46 @@ @c MAYBE COPY THIS EXAMPLE TO remove AND/OR kill @c ===beg=== -@c infix ("@"); -@c "@" (a, b) := a^b; -@c 5 @ 3; -@c remove ("@", op); -@c 5 @ 3; -@c "@" (5, 3); -@c infix ("@"); -@c 5 @ 3; -@c kill ("@"); -@c 5 @ 3; -@c "@" (5, 3); +@c infix ("##"); +@c "##" (a, b) := a^b; +@c 5 ## 3; +@c remove ("##", op); +@c 5 ## 3; +@c "##" (5, 3); +@c infix ("##"); +@c 5 ## 3; +@c kill ("##"); +@c 5 ## 3; +@c "##" (5, 3); @c ===end=== @example -(%i1) infix ("@@"); -(%o1) @@ -(%i2) "@@" (a, b) := a^b; +(%i1) infix ("##"); +(%o1) ## +(%i2) "##" (a, b) := a^b; b -(%o2) a @@ b := a -(%i3) 5 @@ 3; +(%o2) a ## b := a +(%i3) 5 ## 3; (%o3) 125 -(%i4) remove ("@@", op); +(%i4) remove ("##", op); (%o4) done -(%i5) 5 @@ 3; -Incorrect syntax: @@ is not an infix operator -5 @@ - ^ -(%i5) "@@" (5, 3); +(%i5) 5 ## 3; +Incorrect syntax: # is not a prefix operator +5 ## + ^ +(%i5) "##" (5, 3); (%o5) 125 -(%i6) infix ("@@"); -(%o6) @@ -(%i7) 5 @@ 3; +(%i6) infix ("##"); +(%o6) ## +(%i7) 5 ## 3; (%o7) 125 -(%i8) kill ("@@"); +(%i8) kill ("##"); (%o8) done -(%i9) 5 @@ 3; -Incorrect syntax: @@ is not an infix operator -5 @@ - ^ -(%i9) "@@" (5, 3); -(%o9) @@(5, 3) +(%i9) 5 ## 3; +Incorrect syntax: # is not a prefix operator +5 ## + ^ +(%i9) "##" (5, 3); +(%o9) ##(5, 3) @end example @node Functions and Variables for Expressions, , Syntax, Expressions @@ -1430,38 +1430,55 @@ Examples: -@itemize @bullet -@item If the left and right binding powers of @var{op} are both greater the left and right binding powers of some other operator, then @var{op} takes precedence over the other operator. -@end itemize + +@c ===beg=== +@c :lisp (get '$+ 'lbp) +@c :lisp (get '$+ 'rbp) +@c infix ("##", 101, 101); +@c "##"(a, b) := sconcat("(", a, ",", b, ")"); +@c 1 + a ## b + 2; +@c infix ("##", 99, 99); +@c 1 + a ## b + 2; +@c ===end=== @example -(%i1) "@@"(a, b) := sconcat("(", a, ",", b, ")")$ -(%i2) :lisp (get '$+ 'lbp) +(%i1) :lisp (get '$+ 'lbp) 100 -(%i2) :lisp (get '$+ 'rbp) +(%i1) :lisp (get '$+ 'rbp) 100 -(%i2) infix ("@@", 101, 101)$ -(%i3) 1 + a@@b + 2; +(%i1) infix ("##", 101, 101); +(%o1) ## +(%i2) "##"(a, b) := sconcat("(", a, ",", b, ")"); +(%o2) (a ## b) := sconcat("(", a, ",", b, ")") +(%i3) 1 + a ## b + 2; (%o3) (a,b) + 3 -(%i4) infix ("@@", 99, 99)$ -(%i5) 1 + a@@b + 2; +(%i4) infix ("##", 99, 99); +(%o4) ## +(%i5) 1 + a ## b + 2; (%o5) (a+1,b+2) @end example -@itemize @bullet -@item Greater @var{lbp} makes @var{op} right-associative, while greater @var{rbp} makes @var{op} left-associative. -@end itemize + +@c ===beg=== +@c infix ("##", 100, 99); +@c "##"(a, b) := sconcat("(", a, ",", b, ")")$ +@c foo ## bar ## baz; +@c infix ("##", 100, 101); +@c foo ## bar ## baz; +@c ===end=== @example -(%i1) "@@"(a, b) := sconcat("(", a, ",", b, ")")$ -(%i2) infix ("@@", 100, 99)$ -(%i3) foo @@ bar @@ baz; +(%i1) infix ("##", 100, 99); +(%o1) ## +(%i2) "##"(a, b) := sconcat("(", a, ",", b, ")")$ +(%i3) foo ## bar ## baz; (%o3) (foo,(bar,baz)) -(%i4) infix ("@@", 100, 101)$ -(%i5) foo @@ bar @@ baz; +(%i4) infix ("##", 100, 101); +(%o4) ## +(%i5) foo ## bar ## baz; (%o5) ((foo,bar),baz) @end example Index: Input.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/Input.texi,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- Input.texi 12 Jun 2007 21:17:46 -0000 1.58 +++ Input.texi 30 Jun 2007 19:10:41 -0000 1.59 @@ -1790,17 +1790,17 @@ Assign TeX output for a postfix operator. @c ===beg=== -@c postfix ("@"); -@c texput ("@", "!!", postfix); -@c tex (x @); +@c postfix ("##"); +@c texput ("##", "!!", postfix); +@c tex (x ##); @c ===end=== @example -(%i1) postfix ("@@"); -(%o1) @@ -(%i2) texput ("@@", "!!", postfix); +(%i1) postfix ("##"); +(%o1) ## +(%i2) texput ("##", "!!", postfix); (%o2) !! -(%i3) tex (x @@); +(%i3) tex (x ##); $$x!!$$ (%o3) false @end example Index: Rules.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/Rules.texi,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Rules.texi 12 Jun 2007 21:17:48 -0000 1.28 +++ Rules.texi 30 Jun 2007 19:10:41 -0000 1.29 @@ -732,23 +732,32 @@ @item Delimiters may be almost any strings. @end itemize +@c ===beg=== +@c matchfix ("@@", "~"); +@c @@ a, b, c ~; +@c matchfix (">>", "<<"); +@c >> a, b, c <<; +@c matchfix ("foo", "oof"); +@c foo a, b, c oof; +@c >> w + foo x, y oof + z << / @@ p, q ~; +@c ===end=== @example -(%i1) matchfix ("@@", "~"); -(%o1) "@@" -(%i2) @@ a, b, c ~; -(%o2) @@a, b, c~ +(%i1) matchfix ("@@@@", "~"); +(%o1) @@@@ +(%i2) @@@@ a, b, c ~; +(%o2) @@@@a, b, c~ (%i3) matchfix (">>", "<<"); -(%o3) ">>" +(%o3) >> (%i4) >> a, b, c <<; (%o4) >>a, b, c<< (%i5) matchfix ("foo", "oof"); -(%o5) "foo" +(%o5) foo (%i6) foo a, b, c oof; (%o6) fooa, b, coof -(%i7) >> w + foo x, y oof + z << / @@ p, q ~; +(%i7) >> w + foo x, y oof + z << / @@@@ p, q ~; >>z + foox, yoof + w<< (%o7) ---------------------- - @@p, q~ + @@@@p, q~ @end example @itemize @bullet @@ -848,15 +857,15 @@ (%o1) [foorule1, false] (%i2) tellsimpafter (aa + bb, special_add (aa, bb)); (%o2) [+rule1, simplus] -(%i3) infix ("@@"); -(%o3) @@ -(%i4) tellsimp (aa @@ bb, bb/aa); -(%o4) [@@rule1, false] +(%i3) infix ("@@@@"); +(%o3) @@@@ +(%i4) tellsimp (aa @@@@ bb, bb/aa); +(%o4) [@@@@rule1, false] (%i5) tellsimpafter (quux (%pi, %e), %pi - %e); (%o5) [quuxrule1, false] (%i6) tellsimpafter (quux (%e, %pi), %pi + %e); (%o6) [quuxrule2, quuxrule1, false] -(%i7) [foo (aa, bb), aa + bb, aa @@ bb, quux (%pi, %e), +(%i7) [foo (aa, bb), aa + bb, aa @@@@ bb, quux (%pi, %e), quux (%e, %pi)]; bb (%o7) [bb - aa, special_add(aa, bb), --, %pi - %e, %pi + %e] @@ -865,13 +874,13 @@ (%o8) foo (%i9) remrule ("+", "+rule1"); (%o9) + -(%i10) remrule ("@@", "@@rule1"); -(%o10) @@ +(%i10) remrule ("@@@@", "@@@@rule1"); +(%o10) @@@@ (%i11) remrule (quux, all); (%o11) quux -(%i12) [foo (aa, bb), aa + bb, aa @@ bb, quux (%pi, %e), +(%i12) [foo (aa, bb), aa + bb, aa @@@@ bb, quux (%pi, %e), quux (%e, %pi)]; -(%o12) [foo(aa, bb), bb + aa, aa @@ bb, quux(%pi, %e), +(%o12) [foo(aa, bb), bb + aa, aa @@@@ bb, quux(%pi, %e), quux(%e, %pi)] @end example |