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
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