# Arbitrary sized array

**URL:** <https://fortran-lang.discourse.group/t/arbitrary-sized-array/59>\
**Category:** Help\
**Created:** [May 23, 2020, 2:06pm UTC](https://fortran-lang.discourse.group/t/arbitrary-sized-array/59 "2020-05-23T14:06:36Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![lkedward](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/lkedward/32/72_2.png) [@lkedward](https://fortran-lang.discourse.group/u/lkedward)\
**Post date:** [May 24, 2020, 4:31pm UTC](https://fortran-lang.discourse.group/t/arbitrary-sized-array/59/13 "2020-05-24T16:31:18Z")

</div>

My understanding is that the `block` construct simply allows programmers to organise code by grouping declarations and statements together within a defined local scope. This can have some advantages:

- It avoids large declaration blocks at the beginning of programs and procedures;

- it is easier to reason which variables are used in which execution statements when reading the code;

- it limits the scope of variables so they can’t accidentally be used elsewhere;

- it can be useful for objects with finalizers since these will be called at `end block` if the objects are declared within the `block`.

I don’t believe there is any tacit memory or speed advantage to using `block` constructs, they are just for programmer comfort.  
The main argument against using `block` constructs IMHO is that a procedure would provide the same advantages in terms of code organisation, while also being reusable (callable) whereas a `block` construct is not.

---

_[View the full topic](https://fortran-lang.discourse.group/t/arbitrary-sized-array/59)._
