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
MapleToComplexFloat32 - convert a Maple object to a 32-bit complex float pair
MapleToComplexFloat64 - convert a Maple object to a 64-bit complex float pair
MapleToComplexFloatDAG - convert a Maple object to a complex software float pair
MapleToFloat32 - convert a Maple object to a 32-bit float
MapleToFloat64 - convert a Maple object to a 64-bit float
MapleToInteger8 - convert a Maple object to a 8-bit integer
MapleToInteger16 - convert a Maple object to a 16-bit integer
MapleToInteger32 - convert a Maple object to a 32-bit integer
MapleToM_BOOL - convert a Maple object to a hardware boolean
MapleToM_INT - convert a Maple object to a machine word sized integer
MapleToString - convert a Maple object to a character array
Calling Sequence
MapleToComplexFloat32(kv, s)
MapleToComplexFloat64(kv, s)
MapleToComplexFloatDAG(kv, s)
MapleToFloat32(kv, s)
MapleToFloat64(kv, s)
MapleToInteger8(kv, s)
MapleToInteger16(kv, s)
MapleToInteger32(kv, s)
MapleToM_BOOL(kv, s)
MapleToM_INT(kv, s)
MapleToString(kv, s)
Parameters
kv
-
kernel handle returned by StartMaple
s
Maple object
Description
These functions are part of the OpenMaple interface to Microsoft Visual Basic.
The MapleTo* functions convert a Maple object to a hardware data structure format. The return values are defined in maple.bas.
Note: The maple.bas file is in the extern/include directory of your Maple installation.
Floating-point numbers may lose precision during the conversion to hardware size data.
Conversion from a Maple string object to an integer returns the ASCII value of the first character in that string. Conversion from a Maple boolean to an integer returns 1 for true, 0 for false, and -1 for FAIL.
The M_INT and M_BOOL conversions are equivalent to MapleToInteger32. They are provided in the C API for machine word-size conversions. Future versions of VB OpenMaple may allow up to 64-bit conversions using these functions, depending on the underlying hardware.
Examples
Function MyRand(ByVal kv As Long) As Double
Dim r As Long
r = EvalMapleStatement(kv,
"RandomTools:-Generate([integer(range=-2^31..2^31-1),float]);")
If IsMapleList(kv, r) And MapleNumArgs(kv, r) = 2 Then
Dim f As Double
Dim i As Long
i = MapleToInteger32(kv, MapleListSelect(kv, r, 1))
f = MapleToFloat64(kv, MapleListSelect(kv, r, 2))
MyRand = i * f
Else
MyRand = 0
End If
End Function
See Also
OpenMaple, OpenMaple/VB/API
Download Help Document