Macaulay2 » Documentation
Packages » ForeignFunctions :: ForeignPointerArrayType VisibleList
next | previous | forward | backward | up | index | toc

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 = {0x76cf480979c0, 0x76cf480979b0, 0x76cf480979a0}

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: