# Separation of declaration and initiation of variables

**URL:** <https://fortran-lang.discourse.group/t/separation-of-declaration-and-initiation-of-variables/3685>\
**Category:** Help\
**Created:** [June 7, 2022, 2:21am UTC](https://fortran-lang.discourse.group/t/separation-of-declaration-and-initiation-of-variables/3685 "2022-06-07T02:21:57Z")\
**Posts on this page:** 1\
**Showing post:** 39

<div class="post-metadata">

**Author:** ![Beliavsky](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Post date:** [June 10, 2022, 12:39am UTC](https://fortran-lang.discourse.group/t/separation-of-declaration-and-initiation-of-variables/3685/39 "2022-06-10T00:39:48Z")

</div>

> [@jacobwilliams](#):
>
> > [@Jweber](#):
> >
> > Unfortunately removing the “implicitly declaring save by initialization” would turn vaid code into valid code with different behaviour, which is even more problematic than turning valid into invalid code that no longer compiles (as with removing “implicit none”).
> 
> No, this is not correct. It doesn’t have to be this way. The standard could simply no longer allow this syntax in subroutines and functions:
> 
> ```fortran
> integer :: i = 1
> 
> ```
> 
> That would be a syntax error. It wouldn’t be changed into something else. This is no different then, for example, removing `forall`, which was also done. So, any `forall` statement in old code are now no longer standard, and you get an error If you tell the compiler to rigorously enforce the standard.

Forall has been made obsolescent but has not been deleted. To get an error you would need to use an option that turns compiler warnings about obsolescent features into errors.

> [@Will FORALL be deleted?](https://fortran-lang.discourse.group/t/will-forall-be-deleted/1272):
>
> FORALL is obsolescent in Fortran 2018. I believe that is because the initial aim of helping compilers parallelize code has not been realized and because DO CONCURRENT is now available. I still like FORALL and hope it will be retained, because it is concise and indicates that the operations within can be done in any order. I see that a GSOC student has implemented it in LFortran. How likely is it that FORALL will be deleted in future standards? The F2018 interpretation [says](https://j3-fortran.org/doc/year/18/18-007r1.pdf) “A future revision o…

---

_[View the full topic](https://fortran-lang.discourse.group/t/separation-of-declaration-and-initiation-of-variables/3685)._
