SYNTAX
------

C Syntax
^^^^^^^^

.. code-block:: c

    int MPI_Pack(const void* inbuf, int incount, MPI_Datatype datatype,
        void* outbuf, int outsize, int* position, MPI_Comm comm)

    int MPI_Pack_c(const void* inbuf, MPI_Count incount, MPI_Datatype
        datatype, void* outbuf, MPI_Count outsize, MPI_Count* position,
        MPI_Comm comm)

Fortran Syntax
^^^^^^^^^^^^^^

.. code-block:: fortran

    USE MPI
    ! or the older form: INCLUDE 'mpif.h'
    MPI_PACK(INBUF, INCOUNT, DATATYPE, OUTBUF, OUTSIZE, POSITION, COMM, IERROR)
    	<type> INBUF(*), OUTBUF(*)
    	INTEGER INCOUNT, DATATYPE, OUTSIZE, POSITION, COMM, IERROR

Fortran 2008 Syntax
^^^^^^^^^^^^^^^^^^^

.. code-block:: fortran

    USE mpi_f08
    MPI_Pack(inbuf, incount, datatype, outbuf, outsize, position, comm, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN) :: inbuf
    	INTEGER, INTENT(IN) :: incount, outsize
    	TYPE(MPI_Datatype), INTENT(IN) :: datatype
    	TYPE(*), DIMENSION(..) :: outbuf
    	INTEGER, INTENT(INOUT) :: position
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Pack(inbuf, incount, datatype, outbuf, outsize, position, comm, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN) :: inbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: incount, outsize
    	TYPE(MPI_Datatype), INTENT(IN) :: datatype
    	TYPE(*), DIMENSION(..) :: outbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(INOUT) :: position
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror
