Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
evalhf/var - passing arrays by value/result; var(name)
Description
The var construct is a place holder for Maple array arguments passed as parameters to functions evaluated by evalhf.
For example,
The var array arguments are converted to hardware floating point. Then evalhf evaluates the function with this float array and on return, the arguments are converted back into the Maple array. This achieves an effect similar to var arguments in Pascal function calls, but in reality it does call by value/result.
The var mechanism is the only mechanism available that will obtain an array result from a computation done by evalhf other than individual calls to compute each array entry.
If desired, an evalhf call can be passed an hfarray or rtable with datatype=float[8] or datatype=complex[8] instead of an array. These are truly passed by reference, and result in negligible overhead on entry to and exit from the evalhf environment.
This conversion process is only necessary when passing an array from Maple to an evalhf function call. Calls within functions already under evalhf evaluation do not need the var(..) feature.
Examples
f := proc(A,B) B[1]:= A[2] end proc:
det := proc(A::array) A[1,1]*A[2,2] - A[1,2]*A[2,1]; end proc:
See Also
evalhf[array]
Download Help Document