# Ats\_dynloadflag

**URL:** <https://discourse.ats-lang.org/t/ats-dynloadflag/57>\
**Category:** Google Group\
**Created:** [December 29, 2015, 6:44pm UTC](https://discourse.ats-lang.org/t/ats-dynloadflag/57 "2015-12-29T18:44:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Jones](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@Mike\_Jones](https://discourse.ats-lang.org/u/Mike_Jones)\
**Post date:** [December 29, 2015, 6:44pm UTC](https://discourse.ats-lang.org/t/ats-dynloadflag/57/1 "2015-12-29T18:44:29Z")

</div>

Does ATS\_DYNLOADFLAG 0 in a dats file mean automatically init the file if compiled, or just prevent compile errors if not dyloaded, meaning do not do this if there are values to init?

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [December 29, 2015, 6:50pm UTC](https://discourse.ats-lang.org/t/ats-dynloadflag/57/2 "2015-12-29T18:50:19Z")

</div>

Normally, ATS compiler generates a function for each file  
that must be called before values and functions defined in  
the file can be used.

If ATS\_DYNLOADFLAG is set to 0, then such a function is not  
generated and the programmer needs to take care of issue of initialization  
on their own. Just like in C.On Tue, Dec 29, 2015 at 1:44 PM, Mike Jones [proc...@gmail.com](mailto:proc...@gmail.com) wrote:

> Does ATS\_DYNLOADFLAG 0 in a dats file mean automatically init the file if  
> compiled, or just prevent compile errors if not dyloaded, meaning do not do  
> this if there are values to init?
> 
> –  
> You received this message because you are subscribed to the Google Groups  
> “ats-lang-users” group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [ats-lang-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [https://groups.google.com/group/ats-lang-users](https://groups.google.com/group/ats-lang-users).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/ats-lang-users/6f5980f9-29d6-4403-a478-0e8ec74d91b6%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/6f5980f9-29d6-4403-a478-0e8ec74d91b6%40googlegroups.com)  
> .
