SYNTAX
------

C Syntax
^^^^^^^^

.. code-block:: c

    int MPI_Pack_external(const char datarep[], const void* inbuf, int
        incount, MPI_Datatype datatype, void* outbuf, MPI_Aint outsize,
        MPI_Aint* position)

    int MPI_Pack_external_c(const char datarep[], const void* inbuf,
        MPI_Count incount, MPI_Datatype datatype, void* outbuf,
        MPI_Count outsize, MPI_Count* position)

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

.. code-block:: fortran

    USE MPI
    ! or the older form: INCLUDE 'mpif.h'
    MPI_PACK_EXTERNAL(DATAREP, INBUF, INCOUNT, DATATYPE, OUTBUF, OUTSIZE, POSITION, IERROR)
    	CHARACTER*(*) DATAREP
    	<type> INBUF(*), OUTBUF(*)
    	INTEGER INCOUNT, DATATYPE, IERROR
    	INTEGER(KIND=MPI_ADDRESS_KIND) OUTSIZE, POSITION

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

.. code-block:: fortran

    USE mpi_f08
    MPI_Pack_external(datarep, inbuf, incount, datatype, outbuf, outsize, position, ierror)
    	CHARACTER(LEN=*), INTENT(IN) :: datarep
    	TYPE(*), DIMENSION(..), INTENT(IN) :: inbuf
    	INTEGER, INTENT(IN) :: incount
    	TYPE(MPI_Datatype), INTENT(IN) :: datatype
    	TYPE(*), DIMENSION(..) :: outbuf
    	INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN) :: outsize
    	INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(INOUT) :: position
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Pack_external(datarep, inbuf, incount, datatype, outbuf, outsize, position, ierror)
    	CHARACTER(LEN=*), INTENT(IN) :: datarep
    	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
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror
