Programming - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Programming Facilities Changes in Maple 13

Maple 13 includes the following changes to programming facilities.

 

Task Programming Model

OpenMaple[C]

Preprocessor Extensions

Multiline Comments

Launch External Processes

Task Programming Model

The Threads[Task] subpackage provides a new multithreaded programming model. Using the Task Programming Model, scalable multithreaded code can be written in Maple. This model simplifies the process of writing multithreaded code, often removing the need to use synchronization routines. Going forward, most parallel code should be written using the Task Programming Model instead of calling Threads[Create].

OpenMaple[C]

New commands have been added to the OpenMaple[C] package.  

• 

MaplePushErrorProc and MaplePopErrorProc allow external code to register callback functions that are executed when errors occur.

• 

The MapleGetInterruptValue function returns true if an interrupt has been received by the kernel and false otherwise. This can be used to check if an interrupt has occurred, but the external code needs to perform some cleanup before calling MapleCheckInterrupt.  

• 

The new MaplePushGMPAllocators and MaplePopGMPAllocators functions allow external code to register and unregister GMP memory allocation functions in a thread safe way.

Preprocessor Extensions

Maple language files that contain preprocessor directives may now be read using the read statement. This enables the use of directives such as $include and $define in a more flexible manner than was previously possible.

Multiline Comments

You can now add multiline comments to your code. Multiline comments are delimited by (* and *) characters. Multiline comments are not available in 2-D math. See comment for more about comments in Maple.

Launch External Processes

The system command has a new option that lets you execute an external application in a new process. Maple does not block, waiting for this process to finish, but continues immediately after it was launched.

See Also

Index of New Maple 13 Features

Language and System Updates in Maple 13