11.07.2015 Views

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

206 • Chapter 6: Evaluation and Simplificationrecently assigned directly to that variable.> test:=proc()> local x, y, z;> x := y;> y := z;> z := 5;> x;> end proc:> test();yCompare this evaluation with the similar interactive example in thissection on page 202. Full evaluation within a procedure is rarely necessaryand can lead to inefficiency. If you require full evaluation within aprocedure, use eval.Commands with Special Evaluation RulesThe assigned and evaln Commands The functions assigned andevaln evaluate their arguments only to the level at which they becomenames.> x := y;x := y> y := z;y := z> evaln(x);xThe assigned command checks if a name has a value assigned to it.> assigned( x );true

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

Saved successfully!

Ooh no, something went wrong!