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

ForeignArrayType VisibleList -- cast a Macaulay2 list to a foreign array

Synopsis

Description

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

i1 : intarray5 = 5 * int

o1 = int32[5]

o1 : ForeignArrayType
i2 : x = intarray5 {2, 4, 6, 8, 10}

o2 = {2, 4, 6, 8, 10}

o2 : ForeignObject of type int32[5]

Caveat

The number of elements of x must match the number of elements that were specified when T was constructed.

Ways to use this method: