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
codegen[packparams] - pack parameters of a Maple procedure into an array
codegen[packargs] - pack parameters of a Maple procedure into an array
codegen[packlocals] - pack locals of a Maple procedure into an array
codegen[swapargs] - interchange two arguments in a Maple procedure
codegen[renamevar] - rename a variable in a Maple procedure
Calling Sequence
packparams(f, X, A)
packargs(f, X, A)
packlocals(f, X, A)
swapargs(f, m=n)
renamevar(x=y, f)
Parameters
f
-
Maple procedure
X
list of symbols
A
name of array argument
x, y
symbols (parameters in f)
m, n
integers (positions of parameters in f)
Description
The packparams function is used to collect the parameters in the list X into one parameter, an array named A, in the Maple procedure f.
The packargs function is a synonym for the packparams function.
The packlocals function is used to collect the local variables in the list X into one local variable, an array named A, in the Maple procedure f.
The swapargs function is used to swap the formal parameter at position m with the formal parameter at position n in a Maple procedure.
The renamevar function is used to rename a (parameter, local, or global) variable x with the new name y in a Maple procedure.
The command with(codegen,packargs) allows the use of the abbreviated form of this command.
The command with(codegen,packlocals) allows the use of the abbreviated form of this command.
The command with(codegen,swapargs) allows the use of the abbreviated form of this command.
The command with(codegen,renamevar) allows the use of the abbreviated form of this command.
Examples
f := proc(x,y,z) local r,s,t; r := x*z; s := y^2; t := r*s; t^2 end proc:
Error, (in `codegen/renamevar`) parameter and local `x` have the same name
See Also
codegen[declare]
Download Help Document