[LON-CAPA-cvs] cvs: loncom /homework lonmaxima.pm

www lon-capa-cvs-allow@mail.lon-capa.org
Sat, 26 May 2007 15:51:08 -0000


www		Sat May 26 11:51:08 2007 EDT

  Modified files:              
    /loncom/homework	lonmaxima.pm 
  Log:
  Only get rid of leading and trailing spaces, so the derivative of 3*sin(0.5*x) is not 15cos(05x)
  
  
Index: loncom/homework/lonmaxima.pm
diff -u loncom/homework/lonmaxima.pm:1.13 loncom/homework/lonmaxima.pm:1.14
--- loncom/homework/lonmaxima.pm:1.13	Thu Apr 19 13:40:43 2007
+++ loncom/homework/lonmaxima.pm	Sat May 26 11:51:08 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Interface routines to MAXIMA CAS
 #
-# $Id: lonmaxima.pm,v 1.13 2007/04/19 17:40:43 raeburn Exp $
+# $Id: lonmaxima.pm,v 1.14 2007/05/26 15:51:08 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -75,7 +75,8 @@
 	if ($line=~/\w/) { $reply=&maximareply($socket,$line.";\n"); }
 	if ($reply=~/^Error\:/) { return $reply; }
     }
-    $reply=~s/\W//gs;
+    $reply=~s/^\s*//gs;
+    $reply=~s/\s*$//gs;
     return $reply;
 }