# mxCopyInteger4ToPtr, mxCopyPtrToInteger4

## Purpose

Copy `INTEGER`*`4` values between Fortran and pointer arrays.

## Fortran Synopsis

    subroutine mxCopyPtrToInteger4(px,y,n)
    subroutine mxCopyInteger4ToPtr(y,px,n)
    integer*4 y(n)
    integer*4 px, n

## Arguments

`n`
  number of elements to copy
`px`
  pointer to `ir` or `jc` array
`y`
  INTEGER*`4` Fortran array

## Description

These routines provide a way to copy `INTEGER`*`4` values between MATLAB `ir` or `jc` arrays and Fortran `INTEGER`*`4` arrays. They are essential for use with Fortran compilers that do not support the `%VAL` construct in order to set up standard Fortran arrays for passing as arguments to the computation routine of a MEX-file.

`mxCopyPtrToInteger4(px,y,n)` copies `n` `INTEGER`*`4` values from the MATLAB array pointed to by `px` into the Fortran `INTEGER`*`4` array `y`.

`mxCopyInteger4ToPtr(y,px,n)` copies `n` `INTEGER`*`4` values from the Fortran `INTEGER`*`4` array `y` into the MATLAB array pointed to by `px`.

(c) Copyright 1994 by The MathWorks, Inc.