# Specifying command line arguments via the PROGRAM statement

**URL:** <https://fortran-lang.discourse.group/t/specifying-command-line-arguments-via-the-program-statement/2982>\
**Category:** Language enhancement\
**Created:** [March 16, 2022, 1:00am UTC](https://fortran-lang.discourse.group/t/specifying-command-line-arguments-via-the-program-statement/2982 "2022-03-16T01:00:58Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [March 22, 2022, 9:50am UTC](https://fortran-lang.discourse.group/t/specifying-command-line-arguments-via-the-program-statement/2982/21 "2022-03-22T09:50:22Z")

</div>

Great example! Thanks for sharing.

Upon an error you could deploy the [pretty-diagnostics](https://github.com/awvwgk/pretty-diagnostics) tool by @awvwgk (a discussion is available in the thread [Exploring first class error messages for Fortran](https://fortran-lang.discourse.group/t/exploring-first-class-error-messages-for-fortran/2327)). I wonder if there is a preprocessing trick, which would help share the namelist arguments between the parser and the error reporting.

I think it’s exactly what @urbanjost is trying to suggest as an enhancement, in order to avoid writing/copying the boiler-plate read/parse subroutines.

---

_[View the full topic](https://fortran-lang.discourse.group/t/specifying-command-line-arguments-via-the-program-statement/2982)._
