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
MapleListAlloc - create a list in external code
MapleListAssign - assign into a list in external code
MapleListSelect - select from a list in external code
Calling Sequence
MapleListAlloc(kv, n)
MapleListAssign(kv, list, i, val)
MapleListSelect(kv, list, i)
Parameters
kv
-
kernel handle returned by StartMaple
n
number of elements in the list
list
Maple list object
i
index of entry in a list
val
value to assign into the list
Description
These functions are part of the OpenMaple interface to Microsoft Visual Basic.
The MapleListAlloc function creates a new list that can contain n elements. The list must be filled completely before passing it back to Maple.
The MapleListAssign function sets the ith element of the given list to the value val. Lists can be modified only if they were created by MapleListAlloc and have never entered Maple (for example, as an argument to a function evaluation or returned value). Lists are static objects; once created, they cannot change. For information on working with a dynamic object, see ?RTableCreate.
The MapleListSelect function retrieves the ith element of the given list. Indexing in a list starts at 1.
The size of a list can be obtained using the MapleNumArgs command.
Examples
Sub LuckyNumbers(ByVal kv As Long)
Dim list, args As Long
list = MapleListAlloc(kv, 6)
MapleListAssign kv, list, 1, ToMapleInteger(kv, 1)
MapleListAssign kv, list, 2, ToMapleInteger(kv, 33)
MapleListAssign kv, list, 3, ToMapleInteger(kv, 42)
MapleListAssign kv, list, 4, ToMapleInteger(kv, 50)
MapleListAssign kv, list, 5, ToMapleInteger(kv, 55)
MapleListAssign kv, list, 6, ToMapleInteger(kv, 67)
MapleALGEB_Printf1 kv, "%a", MapleListSelect(kv, list, 4)
MapleALGEB_Printf1 kv, "%a", list
End Sub
See Also
OpenMaple, OpenMaple/VB/API, OpenMaple/VB/Examples
Download Help Document