11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming 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.

2 Procedures, Variables,and Extending MaplePrerequisite KnowledgeBefore reading this chapter, you must have an understanding of Mapleevaluation rules for variables and parameters as described in Chapter 6of the Introductory <strong>Programming</strong> <strong>Guide</strong>.In This ChapterNested ProceduresMaple procedure.You can define a Maple procedure within anotherProcedures That Return Procedures You can create procedures thatreturn procedures by using Maple evaluation rules.Local Variables Local variables can exist after the procedure which createdthem has exited. This feature allows a procedure to return a procedure.The new procedure requires a unique place to store information.Interactive Input You can write interactive procedures, querying theuser for missing information or creating an interactive tutorial or a test.Extending Maple The Maple software includes useful mechanisms forextending Maple functionality, which reduce the need to write specialpurposeprocedures. Several Maple commands can be extended.2.1 Nested ProceduresYou can define a Maple procedure inside another Maple procedure. SomeMaple commands are very useful inside a procedure. In the worksheet3

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

Saved successfully!

Ooh no, something went wrong!