Next: Localised definitions Up: Construction Previous: Output as strings

Reformatting expressions

Several Mathematica functions have been redefined in order to modify the way that they are formatted. In order to do this a Block structure has been used to temporarily set aside current definitions and attributes (such as Protected) and assign new definitions. Any redefinitions hold only within the scope of the Block and this form of encapsulation mechanism avoids interference with the rest of the system. For example, in some cases it is convenient to attach a rule to a built-in function such as Power. In such cases, Block ensures that the rule is removed before any result is returned.


bondaren@thsun1.jinr.ru