12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

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

Create successful ePaper yourself

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

5.4 Evaluation Rules • 193> z := array( [ [1,2], [3,4] ] );[ ] 1 2z :=3 4Maple substitutes y for x and z for y. Because evaluation of the lastname, z, would produce an array, one of the four special structures, z isunevaluated.> x;zMaple uses last-name evaluation for arrays, tables, matrices, and proceduresto retain compact representations of unassigned table entries (forexample, T[3]) and unevaluated commands (for example, sin(x)). Formore information on last-name evaluation, refer to ?last_name_eval.You can force full evaluation by calling eval explicitly.> eval(x);[ ] 1 23 4> add2 := proc(x,y) x+y; end proc;add2 := proc(x, y) x + y end proc> add2;add2You can easily force full evaluation, using eval or print.> eval(add2);proc(x, y) x + y end procNote that full evaluation of Maple library procedures, by default, suppressesthe code in the procedure. To illustrate this, examine the erficommand

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

Saved successfully!

Ooh no, something went wrong!