next | previous | forward | backward | up | top | index | toc | Macaulay2 website
ForeignFunctions :: ForeignPointerArrayType VisibleList

ForeignPointerArrayType VisibleList -- cast a Macaulay2 list to a foreign pointer array

Synopsis

Description

To cast a Macaulay2 list to a foreign pointer array type, give the type followed by the list.

i1 : charstarstar {"foo", "bar"}

o1 = {foo, bar}

o1 : ForeignObject of type char**
i2 : voidstarstar {address int 0, address int 1, address int 2}

o2 = {0x7f7815a55060, 0x7f7815a55020, 0x7f7815a55010}

o2 : ForeignObject of type void**
i3 : int2star = foreignPointerArrayType(2 * int)

o3 = int32[2]*

o3 : ForeignPointerArrayType
i4 : int2star {{1, 2}, {3, 4}, {5, 6}, {7, 8}, {9, 10}}

o4 = {{1, 2}, {3, 4}, {5, 6}, {7, 8}, {9, 10}}

o4 : ForeignObject of type int32[2]*

Ways to use this method: