The mapping modes `WRITE' and `UPDATE' may be specified in calls to NDF_MAP in place of `READ' to indicate that new values are to be written to an NDF's array component, or that its existing values are to be updated (i.e. modified), respectively. The mapped values can then be accessed in exactly the same was as for read access, except that any modifications made to the mapped values will be reflected in the actual values stored in the data structure. The transfer of these new values back to the NDF is completed when the array is unmapped, for instance:
CALL NDF_MAP( INDF, 'Variance', '_REAL', 'WRITE', PNTR, EL, STATUS )
CALL SETVAR( EL, %VAL( PNTR( 1 ) ), STATUS )
CALL NDF_UNMAP( INDF, 'Variance', STATUS )
Here, an NDF's variance component is mapped for `WRITE' access and passed to a routine SETVAR which assigns values to it. When NDF_UNMAP is called, these new values are transferred to the NDF. If the variance component was previously in an undefined state, it now becomes defined.