MapleSelectIndexed - Maple Help

Home : Support : Online Help : Programming : OpenMaple : VB Application Programming Interface : Assignment and Selection Functions : OpenMaple/VB/MapleSelectIndexed

MapleSelectIndexed

select from a table, list, or rtable in external code

MapleSelectImaginaryPart

select the imaginary part of a complex-valued expression in external code

MapleSelectRealPart

select the real part of a complex-valued expression in external code

 Calling Sequence MapleSelectIndexed(kv, s, n, ind) MapleSelectImaginaryPart(kv, s) MapleSelectRealPart(kv, s)

Parameters

 kv - kernel handle returned by StartMaple s - an indexable Maple object n - length of ind ind - 32-bit integer index array

Description

 • These functions are part of the OpenMaple interface to Microsoft Visual Basic.
 • The MapleSelectIndexed function retrieves the element s[ind], where s is a list, set, table, or rtable object. The index is an integer array.  To reference s[1,2], set ind(0) = 1, and ind(1) = 2;.
 • The MapleSelectImaginaryPart function returns the imaginary part of s. The MapleSelectRealPart function returns the real part of s. These commands are equivalent to the Maple Im and Re commands.

Examples

 Sub TestSelect(ByVal kv As Long) Dim s, r As Long Dim ind(2) As Long s = EvalMapleStatement(kv, "Matrix([[red,yellow],[green,blue]]);") ind(0) = 1 ind(1) = 2 r = MapleSelectIndexed(kv, s, 2, ind(0)) MapleALGEB_Printf1 kv, "r = %a", r s = EvalMapleStatement(kv, "1.1+2.2*I;") r = MapleSelectRealPart(kv, s) MapleALGEB_Printf1 kv, "re = %a", r End Sub