11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.4 The use Statement • 101C++), because the rebinding occurs during automatic simplification inMaple.If an operator name appears on the left side of a binding equationfor a use statement (consequently, if it is an exported name of a modulethat is bound via use), then the corresponding operator expressions inthe body of the use statement are transformed into function calls. Forexample:> use ‘+‘ = F in a + b end;F(a, b)> m := module()> export ‘*‘, ‘+‘;> ‘+‘ := ( a, b ) -> a + b - 1;> ‘*‘ := ( a, b ) -> a / b;> end module:> s * ( s + t );s (s + t)> use m in s * ( s + t ) end;ss + t − 1The operators that can be rebound are summarized in the followingtable.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!