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

foreignArrayType -- construct a foreign array type

Synopsis

Description

To construct a foreign array type, specify a name, the type of the elements of each array, and the number of elements in each array.

i1 : foreignArrayType("myArrayType", int, 5)

o1 = myArrayType

o1 : ForeignArrayType

If the name is omitted, then a default one is chosen by taking the name of the type of the elements and appending the number of elements enclosed in brackets.

i2 : foreignArrayType(int, 5)

o2 = int32[5]

o2 : ForeignArrayType

Alternatively, you may "multiply" the number of elements by the type to accomplish the same.

i3 : 5 * int

o3 = int32[5]

o3 : ForeignArrayType

Ways to use foreignArrayType :

For the programmer

The object foreignArrayType is a method function.