# An unallocated variable passed as an argument is not PRESENT

**URL:** <https://fortran-lang.discourse.group/t/an-unallocated-variable-passed-as-an-argument-is-not-present/1724>\
**Category:** Uncategorized\
**Created:** [August 19, 2021, 8:45pm UTC](https://fortran-lang.discourse.group/t/an-unallocated-variable-passed-as-an-argument-is-not-present/1724 "2021-08-19T20:45:21Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![FortranFan](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FortranFan](https://fortran-lang.discourse.group/u/FortranFan)\
**Post date:** [August 22, 2021, 4:29am UTC](https://fortran-lang.discourse.group/t/an-unallocated-variable-passed-as-an-argument-is-not-present/1724/10 "2021-08-22T04:29:04Z")

</div>

> [@robert1](#):
>
> Surprisingly, in the 2018 edition of MFE this feature is addressed as a depcrecated feature …

@m_b_metcalf , in case this has not been noted already, FIgure A.4 in the Eighth Edition of Modern Fortran Explained has typos related to `pivotptr` variable since Figure A.3 in indicated as the basis: the following is suggested.

* * *

Figure A.4 Huge unreadable nested if constructs

* * *

```Fortran
if ( allocated(worka) ) then
   if ( allocated(workb1) then
      if ( allocated(workb2) ) then
         if ( associated(pivotptr) ) then
            call process_work( x, worka, workb1, workbb2, pivotptr )
         else
            call process_work( x, worka, workb1, worbk2 )
         end if
      else if ( associated(pivotptr) ) then
         call process_work( x, worka, workb1, pivot=pivotptr )
      else
         call process_work( x, worka, workb1 )
      end if
.
. ( Remainder of large nested if coonstruct elided
.

```

---

_[View the full topic](https://fortran-lang.discourse.group/t/an-unallocated-variable-passed-as-an-argument-is-not-present/1724)._
