# Computing at compile time

**URL:** <https://fortran-lang.discourse.group/t/computing-at-compile-time/3044>\
**Category:** Uncategorized\
**Created:** [March 24, 2022, 8:26pm UTC](https://fortran-lang.discourse.group/t/computing-at-compile-time/3044 "2022-03-24T20:26:06Z")\
**Posts on this page:** 1\
**Showing post:** 32

<div class="post-metadata">

**Author:** ![Nocaster60](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@Nocaster60](https://fortran-lang.discourse.group/u/Nocaster60)\
**Post date:** [March 26, 2022, 6:39pm UTC](https://fortran-lang.discourse.group/t/computing-at-compile-time/3044/32 "2022-03-26T18:39:05Z")

</div>

Is a compiler required to evaluate constant expressions at compile time? “Silly programs” aside, if I have, for example,  
iAny([SWP\_FRAMECHANGED,SWP\_NOMOVE,SWP\_NOSIZE,SWP\_NOZORDER])  
(where the SWP\_s are parameters) as an argument in a function call, can I expect the compiler to pass a constant evaluated at compile time or is it at liberty to generate code that evaluates a value at run time? I had a quick look at the standard but couldn’t see anything that mentioned it.

---

_[View the full topic](https://fortran-lang.discourse.group/t/computing-at-compile-time/3044)._
