From: Chris S. <san...@us...> - 2010-07-30 14:51:45
|
Update of /cvsroot/stack/stack-dev/lib/CAS In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv1679/lib/CAS Modified Files: Tag: STACK2_2 casText.php Log Message: Adjust the patterns so the numbers can be entered 1000=1E+3 Index: casText.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/CAS/casText.php,v retrieving revision 1.39 retrieving revision 1.39.2.1 diff -C2 -d -r1.39 -r1.39.2.1 *** casText.php 18 Feb 2010 11:01:07 -0000 1.39 --- casText.php 30 Jul 2010 14:51:35 -0000 1.39.2.1 *************** *** 185,189 **** foreach($this->cmdArray as $cmd) { ! $pat = "|([A-za-z0-9\(\)]+) ([A-za-z0-9\(\)]+)|"; if (preg_match($pat,$cmd)) { --- 185,189 ---- foreach($this->cmdArray as $cmd) { ! $pat = "|([A-Za-z0-9\(\)]+) ([A-Za-z0-9\(\)]+)|"; if (preg_match($pat,$cmd)) { *************** *** 528,534 **** // We assume f and g are single letter functions. $patterns[] = "|(\))(\()|"; // Simply the pattern ")(". Must be wrong! ! $patterns[] = "|([0-9]+)([A-Za-eh-z])|"; // eg 3x ! $patterns[] = "|([0-9])([A-Za-z]\()|"; // eg 3 x ( ! $patterns[] = "|(\))([0-9A-Za-z])|"; // eg )a if ($this->security == 's') --- 528,534 ---- // We assume f and g are single letter functions. $patterns[] = "|(\))(\()|"; // Simply the pattern ")(". Must be wrong! ! $patterns[] = "|([0-9]+)([A-DF-Za-eh-z])|"; // eg 3x ! $patterns[] = "|([0-9])([A-DF-Za-z]\()|"; // eg 3 x ( ! $patterns[] = "|(\))([0-9A-DF-Za-z])|"; // eg )a if ($this->security == 's') *************** *** 536,541 **** // Teachers have more options for functions $patterns[] = "|([0-9]+)(\()|"; // eg 3212 ( ! $patterns[] = "|(^[A-Za-eh-z])(\()|"; // eg a( , that is a single letter. ! $patterns[] = "|(\*[A-Za-eh-z])(\()|"; } --- 536,541 ---- // Teachers have more options for functions $patterns[] = "|([0-9]+)(\()|"; // eg 3212 ( ! $patterns[] = "|(^[A-DF-Za-eh-z])(\()|"; // eg a( , that is a single letter. ! $patterns[] = "|(\*[A-DF-Za-eh-z])(\()|"; } *************** *** 598,605 **** { // We assume f and g are single letter functions. $patterns[] = "|(\))(\()|"; // Simply the pattern ")(". Must be wrong! ! $patterns[] = "|([0-9]+)([A-Za-eh-z])|"; // eg 3x ! $patterns[] = "|([0-9])([A-Za-z]\()|"; // eg 3 x ( ! $patterns[] = "|(\))([0-9A-Za-z])|"; // eg )a if ($this->security == 's') --- 598,606 ---- { // We assume f and g are single letter functions. + // We exclude E (capital eee) to enable 24E+1 to be a floating point number. $patterns[] = "|(\))(\()|"; // Simply the pattern ")(". Must be wrong! ! $patterns[] = "|([0-9]+)([A-DF-Za-eh-z])|"; // eg 3x ! $patterns[] = "|([0-9])([A-DF-Za-z]\()|"; // eg 3 x ( ! $patterns[] = "|(\))([0-9A-DF-Za-z])|"; // eg )a if ($this->security == 's') *************** *** 607,612 **** // Teachers have more options for functions $patterns[] = "|([0-9]+)(\()|"; // eg 3212 ( ! $patterns[] = "|(^[A-Za-eh-z])(\()|"; // eg a( , that is a single letter. ! $patterns[] = "|(\*[A-Za-eh-z])(\()|"; } --- 608,613 ---- // Teachers have more options for functions $patterns[] = "|([0-9]+)(\()|"; // eg 3212 ( ! $patterns[] = "|(^[A-DF-Za-eh-z])(\()|"; // eg a( , that is a single letter. ! $patterns[] = "|(\*[A-DF-Za-eh-z])(\()|"; } |