anchor.diff:     TYPE(ExtPtfm_MiscVarType),          INTENT(INOUT) :: m          !< Misc/optimization variables
      INTEGER(IntKi),                     INTENT(  OUT) :: ErrStat    !< Error status of the operation
      CHARACTER(*),                       INTENT(  OUT) :: ErrMsg     !< Error message if ErrStat /= ErrID_None
  -   REAL(ReKi), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dYdu(:,:)  !< Partial derivatives of output functions (Y) with respect 
  +   REAL(R8Ki), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dYdu(:,:)  !< Partial derivatives of output functions (Y) with respect 
                                                                      !!   to the inputs (u) [intent in to avoid deallocation]
  -   REAL(ReKi), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dXdu(:,:)  !< Partial derivatives of continuous state functions (X) with 
  +   REAL(R8Ki), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dXdu(:,:)  !< Partial derivatives of continuous state functions (X) with 
                                                                      !!   respect to the inputs (u) [intent in to avoid deallocation]
  -   REAL(ReKi), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dXddu(:,:) !< Partial derivatives of discrete state functions (Xd) with 
  +   REAL(R8Ki), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dXddu(:,:) !< Partial derivatives of discrete state functions (Xd) with 
                                                                      !!   respect to the inputs (u) [intent in to avoid deallocation]
  -   REAL(ReKi), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dZdu(:,:)  !< Partial derivatives of constraint state functions (Z) with 
  +   REAL(R8Ki), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dZdu(:,:)  !< Partial derivatives of constraint state functions (Z) with 
                                                                      !!   respect to the inputs (u) [intent in to avoid deallocation]
      INTEGER(IntKi) :: i,j  ! Loop index
      INTEGER(IntKi) :: idx  ! Index of output channel in AllOuts
  
positive.code:       if (p%OutParam(I)%Indx>0) then
            y%WriteOutput(I) = p%OutParam(I)%SignM * m%AllOuts( p%OutParam(I)%Indx )
        else
            y%WriteOutput(I) = -999.99e-99
        endif
     enddo    
  END SUBROUTINE ExtPtfm_CalcOutput
  
negative.code:    TYPE(ExtPtfm_MiscVarType),          INTENT(INOUT) :: m          !< Misc/optimization variables
     INTEGER(IntKi),                     INTENT(  OUT) :: ErrStat    !< Error status of the operation
     CHARACTER(*),                       INTENT(  OUT) :: ErrMsg     !< Error message if ErrStat /= ErrID_None
     REAL(R8Ki), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dYdx(:,:)  !< Partial derivatives of output functions
                                                                     !!   (Y) with respect to the continuous
                                                                     !!   states (x) [intent in to avoid deallocation]
     REAL(R8Ki), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dXdx(:,:)  !< Partial derivatives of continuous state
                                                                     !!   functions (X) with respect to
                                                                     !!   the continuous states (x) [intent in to avoid deallocation]
     REAL(R8Ki), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dXddx(:,:) !< Partial derivatives of discrete state
                                                                     !!   functions (Xd) with respect to
                                                                     !!   the continuous states (x) [intent in to avoid deallocation]
     REAL(R8Ki), ALLOCATABLE, OPTIONAL,  INTENT(INOUT) :: dZdx(:,:)  !< Partial derivatives of constraint state
                                                                     !!   functions (Z) with respect to
                                                                     !!   the continuous states (x) [intent in to avoid deallocation]
     INTEGER(IntKi) :: i,j    ! Loop index
  