Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
MapleAssign - assign a value to a Maple variable in external code
MapleAssignIndexed - assign to an indexable object element in external code
Calling Sequence
MapleAssign(kv, lhs, rhs)
MapleAssignIndexed(kv, lhs, n, ind, rhs)
Parameters
kv
-
kernel handle returned by StartMaple
lhs
assignable Maple object
rhs
Maple object
n
length of ind
ind
index array
Description
These functions are part of the OpenMaple interface to Microsoft Visual Basic.
The MapleAssign function attempts to assign lhs := rhs.
The MapleAssignIndexed function attempts to assign lhs[ind] := rhs. The index, ind is an array of 32-bit integers. To reference lhs[1,2], set ind[0] = 1, and ind[1] = 2.
Examples
Sub TestMapleAssign(ByVal kv As Long)
Dim a, b, r, val As Long
Dim index(1) As Long
' assign to Maple variables a and b
a = ToMapleName(kv, "a", True)
MapleAssign kv, a, ToMapleFloat(kv, 3.14)
b = ToMapleName(kv, "b", True)
MapleAssign kv, b, ToMapleFloat(kv, 2.71)
' compute a*b
val = EvalMapleStatement(kv, "a*b;")
'save the result in a table called my_results
r = ToMapleName(kv, "my_results", True)
index(0) = 1
index(1) = 1
MapleAssignIndexed kv, r, 2, index(0), val
MapleALGEB_Printf1 kv, "%a", val
MapleALGEB_Printf1 kv, "%a", MapleSelectIndexed(kv, r, 2, index(0))
EvalMapleStatement kv, "eval(my_results);"
End Sub
See Also
OpenMaple, OpenMaple/VB/API, OpenMaple/VB/Examples
Download Help Document