MapleLibName - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


MapleLibName

set or query libname in external code

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

MapleLibName(kv, val)

Parameters

kv

-

kernel handle returned by StartMaple

val

-

expression sequence object containing strings

Description

• 

This function is part of the OpenMaple interface to Microsoft Visual Basic.

• 

The MapleLibName function returns the currently assigned value of libname, which controls the location of Maple libraries. If val is not 0, then it also tries to assign libnameval.

• 

Never directly modify the expression sequence returned by MapleLibName. Always create a new expression sequence to change the value.

Examples

Sub MyLoadPackage(ByVal kv As Long)

    Dim mylib As String

    Dim n, i, libname As Long

    ' find the maple directory

    mylib = MapleToString(kv, MapleKernelOptions(kv, "mapledir", 0))

    mylib = mylib + "tool_lib"

    ' get the current value of libname

    libname = MapleLibName(kv, 0)

    ' copy the current value into a new expression sequence with

    ' room for one more entry.

    n = MapleNumArgs(kv, libname)

    newlibname = NewMapleExpressionSequence(kv, n + 1)

    For i = 1 To n

        MapleExpseqAssign kv, newlibname, i, MapleExpseqSelect(kv, libname, i)

    Next i

    ' append the tool_lib directory to libname

    MapleExpseqAssign kv, newlibname, i, ToMapleString(kv, mylib)

    MapleLibName kv, newlibname

    EvalMapleStatement kv, "libname;"

End Sub

See Also

exprseq

OpenMaple

OpenMaple/VB/API

OpenMaple/VB/Examples