[system] / trunk / pg / macros / Parser.pl Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

Log of /trunk/pg/macros/Parser.pl

Revision 2666 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 22 00:56:32 2004 UTC (15 years, 6 months ago) by dpvc
File length: 5306 byte(s)
Diff to previous 2644
```Formulas can now be compared even if their variables are complex
numbers, or even points or vectors!  This makes it possible to ask
students for complex functions like z^2+i and so on.

You can specify limits for variables either via
Context()->variables->set(x=>{limits=>[0,1]})  (for reals) or
Context()->variables->set(z=>{limits=>[[-2,2],[0,1]]}) (for complexes).
Similarly for points and vectors (where the number of sub arrays
depends on the dimension).  You can also give the limits for a
specific formula by assigning to its ->{limits} field:

\$f = Formula("sqrt(x-10)");
\$f->{limits} = [10,12];

There are now named variable types for 'Point2D', 'Point3D',
'Vector2D' and 'Vector3D', in addition to 'Real' and 'Complex'.
You can also specify a variable type by giving an explicit instance of
a value of the given type.  E.g.

Context()->variables->add(r=>Vector(0,0,0));   # a vector in R^3
Context()->variables->add(X=>'Vector3D');      # a vector in R^3

There still needs to be more error checking in processing
user-supplied limits, but I'm not sure how much overhead is worth it.
```

Revision 2644 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 19 12:01:12 2004 UTC (15 years, 6 months ago) by dpvc
File length: 5307 byte(s)
Diff to previous 2602
```Make sure loadMacros() doesn't try to load these files more than once.
```

Revision 2602 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 13 22:57:27 2004 UTC (15 years, 6 months ago) by dpvc
File length: 5248 byte(s)
Diff to previous 2576
```Changed the way the parser checks to see if it is loaded.
```

Revision 2576 - (view) (download) (as text) (annotate) - [select for diffs]
Added Wed Aug 4 20:52:28 2004 UTC (15 years, 6 months ago) by dpvc
File length: 4715 byte(s)
```Make Parser work with PGauxiliaryFunctions.pl, and add the macro files
needed to initialize the parser.
```

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

 Diffs between and Type of Diff should be a Colored Diff Long Colored Diff Unidiff Context Diff Side by Side

Sort log by: