]> www.ginac.de Git - ginac.git/commitdiff
The last 3 evaluated expressions in ginsh are now referred to with the
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 29 Oct 2001 19:29:02 +0000 (19:29 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 29 Oct 2001 19:29:02 +0000 (19:29 +0000)
tokens '%', '%%' and '%%%'. The old '"', '""' and '"""' remain for
compatibility but may be removed in a future version of GiNaC.

NEWS
doc/tutorial/ginac.texi
ginsh/ginsh.1.in
ginsh/ginsh_lexer.ll

diff --git a/NEWS b/NEWS
index 52f9a4c6699ebc3999312ed4bb253eb60dbecf35..ae20f9843a5a7b919f0f00742f219ae533375f24 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ This file records noteworthy changes.
 
 0.9.5 (<date>)
 * Some internal reorganization resulting in a general speed-up.
 
 0.9.5 (<date>)
 * Some internal reorganization resulting in a general speed-up.
+* The last 3 evaluated expressions in ginsh are now referred to with the
+  tokens '%', '%%' and '%%%'. The old '"', '""' and '"""' remain for
+  compatibility but may be removed in a future version of GiNaC.
 
 0.9.4 (20 September 2001)
 * Functions have better support for external scripting languages.
 
 0.9.4 (20 September 2001)
 * Functions have better support for external scripting languages.
index 94ec39eefcdf49d336a901328c99a7f0af9256f2..28a87bf6bf4d242849aec66d848e6c128e62a4c4 100644 (file)
@@ -364,7 +364,7 @@ lambda^2-3*lambda+11
 [[1,1],[2,-1]]
 > A+2*M;
 [[1,1],[2,-1]]+2*[[1,3],[-3,2]]
 [[1,1],[2,-1]]
 > A+2*M;
 [[1,1],[2,-1]]+2*[[1,3],[-3,2]]
-> evalm(");
+> evalm(%);
 [[3,7],[-4,3]]
 > B = [ [0, 0, a], [b, 1, -b], [-1/a, 0, 0] ];
 > evalm(B^(2^12345));
 [[3,7],[-4,3]]
 > B = [ [0, 0, a], [b, 1, -b], [-1/a, 0, 0] ];
 > evalm(B^(2^12345));
@@ -406,7 +406,7 @@ x^(-1)-1/3*x+Order(x^2)
 > series(tgamma(x),x==0,3);
 x^(-1)-Euler+(1/12*Pi^2+1/2*Euler^2)*x+
 (-1/3*zeta(3)-1/12*Pi^2*Euler-1/6*Euler^3)*x^2+Order(x^3)
 > series(tgamma(x),x==0,3);
 x^(-1)-Euler+(1/12*Pi^2+1/2*Euler^2)*x+
 (-1/3*zeta(3)-1/12*Pi^2*Euler-1/6*Euler^3)*x^2+Order(x^3)
-> evalf(");
+> evalf(%);
 x^(-1)-0.5772156649015328606+(0.9890559953279725555)*x
 -(0.90747907608088628905)*x^2+Order(x^3)
 > series(tgamma(2*sin(x)-2),x==Pi/2,6);
 x^(-1)-0.5772156649015328606+(0.9890559953279725555)*x
 -(0.90747907608088628905)*x^2+Order(x^3)
 > series(tgamma(2*sin(x)-2),x==Pi/2,6);
@@ -414,7 +414,7 @@ x^(-1)-0.5772156649015328606+(0.9890559953279725555)*x
 -Euler-1/12+Order((x-1/2*Pi)^3)
 @end example
 
 -Euler-1/12+Order((x-1/2*Pi)^3)
 @end example
 
-Here we have made use of the @command{ginsh}-command @code{"} to pop the
+Here we have made use of the @command{ginsh}-command @code{%} to pop the
 previously evaluated element from @command{ginsh}'s internal stack.
 
 If you ever wanted to convert units in C or C++ and found this is
 previously evaluated element from @command{ginsh}'s internal stack.
 
 If you ever wanted to convert units in C or C++ and found this is
@@ -3166,7 +3166,7 @@ the list. @code{find()} returns false if no matches were found (in
   (Note the absence of "x".)
 > expand((sin(x)+sin(y))*(a+b));
 sin(y)*a+sin(x)*b+sin(x)*a+sin(y)*b
   (Note the absence of "x".)
 > expand((sin(x)+sin(y))*(a+b));
 sin(y)*a+sin(x)*b+sin(x)*a+sin(y)*b
-> find(",sin($1));
+> find(%,sin($1));
 @{sin(y),sin(x)@}
 @end example
 
 @{sin(y),sin(x)@}
 @end example
 
@@ -5629,7 +5629,7 @@ AC_PROG_CXX
 AC_PROG_INSTALL
 AC_LANG_CPLUSPLUS
 
 AC_PROG_INSTALL
 AC_LANG_CPLUSPLUS
 
-AM_PATH_GINAC(0.7.0, [
+AM_PATH_GINAC(0.9.0, [
   LIBS="$LIBS $GINACLIB_LIBS"
   CPPFLAGS="$CPPFLAGS $GINACLIB_CPPFLAGS"  
 ], AC_MSG_ERROR([need to have GiNaC installed]))
   LIBS="$LIBS $GINACLIB_LIBS"
   CPPFLAGS="$CPPFLAGS $GINACLIB_CPPFLAGS"  
 ], AC_MSG_ERROR([need to have GiNaC installed]))
index a66c23e1295276511c077daf74fc7c5ff9275381..c3b9305e39becd44ad0db3eb75aa18f8eb462572 100644 (file)
@@ -119,7 +119,7 @@ for example $0, $1 etc.
 .SS LAST PRINTED EXPRESSIONS
 ginsh provides the three special symbols
 .RS
 .SS LAST PRINTED EXPRESSIONS
 ginsh provides the three special symbols
 .RS
-", "" and """
+%, %% and %%%
 .RE
 that refer to the last, second last, and third last printed expression, respectively.
 These are handy if you want to use the results of previous computations in a new
 .RE
 that refer to the last, second last, and third last printed expression, respectively.
 These are handy if you want to use the results of previous computations in a new
@@ -458,7 +458,7 @@ x
 [[\-x+x^2\-2,(x+1)^2],[c,d]]
 > determinant(M);
 \-2*d\-2*x*c\-x^2*c\-x*d+x^2*d\-c
 [[\-x+x^2\-2,(x+1)^2],[c,d]]
 > determinant(M);
 \-2*d\-2*x*c\-x^2*c\-x*d+x^2*d\-c
-> collect(", x);
+> collect(%, x);
 (\-d\-2*c)*x+(d\-c)*x^2\-2*d\-c
 > solve quantum field theory;
 parse error at quantum
 (\-d\-2*c)*x+(d\-c)*x^2\-2*d\-c
 > solve quantum field theory;
 parse error at quantum
index 932f80b4dcfb8f83e84c3c109f109246c15559b6..d9329bfe36e549f5d8210b47e5cd8c83acb8d1b3 100644 (file)
@@ -88,6 +88,9 @@ score                 return T_SCORE;
 \"                     return T_QUOTE;
 \"\"                   return T_QUOTE2;
 \"\"\"                 return T_QUOTE3;
 \"                     return T_QUOTE;
 \"\"                   return T_QUOTE2;
 \"\"\"                 return T_QUOTE3;
+\%                     return T_QUOTE;
+\%\%                   return T_QUOTE2;
+\%\%\%                 return T_QUOTE3;
 
                        /* numbers */
 {D}+                   |
 
                        /* numbers */
 {D}+                   |