Macaulay2 » Documentation
Packages » ForeignFunctions » ForeignType » size(ForeignType)
next | previous | forward | backward | up | index | toc

# size(ForeignType) -- size of a foreign type

- Function: size
- Usage:
    `size T`
- Inputs:
  - T, a foreign type,
- Outputs:
  - an integer,

## Description

Return the number of bytes needed by the given foreign type, just like the sizeof operator in C.

    i1 : size char'

    o1 = 1

    i2 : size voidstar

    o2 = 8

## Ways to use this method:

- size(ForeignType) -- size of a foreign type

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/ForeignFunctions.m2:875:0.