# Ats\_packname?

**URL:** https://discourse.ats-lang.org/t/ats-packname/645
**Category:** Google Group
**Created:** [August 30, 2014, 4:12am UTC](https://discourse.ats-lang.org/t/ats-packname/645 "2014-08-30T04:12:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Shea\_Levy](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@Shea\_Levy](https://discourse.ats-lang.org/u/Shea_Levy)
#### Post date: [August 30, 2014, 4:12am UTC](https://discourse.ats-lang.org/t/ats-packname/645/1 "2014-08-30T04:12:20Z")

</div>

Hi all,

I see many source files have ATS\_PACKNAME #defines. I can guess what to  
fill in there for my projects, but how is this used?

~Shea

---

<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: [August 30, 2014, 4:22am UTC](https://discourse.ats-lang.org/t/ats-packname/645/2 "2014-08-30T04:22:07Z")

</div>

Say you declare a function in a file XYZ.dats:

extern fun foo (…): …

The ATS compiler generates a global name for foo  
using the full path of XYZ.dats, which is often hard to read.

If the flag ATS\_PACKNAME is set, then the global name for foo  
is ${ATS\_PACKNAME}foo, where ${ATS\_PACKNAME} is the string  
value of ATS\_PACKNAME.On Sat, Aug 30, 2014 at 12:12 AM, Shea Levy [sh...@shealevy.com](mailto:sh...@shealevy.com) wrote:

> Hi all,
> 
> I see many source files have ATS\_PACKNAME #defines. I can guess what to  
> fill in there for my projects, but how is this used?
> 
> ~Shea
> 
> –  
> 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 [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/ats-lang-users/20140830041220.GA9476%40nixos.hsd1.nh.comcast.net](https://groups.google.com/d/msgid/ats-lang-users/20140830041220.GA9476%40nixos.hsd1.nh.comcast.net)  
> .

---

<div class="post-metadata">

### Author: ![Shea\_Levy](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@Shea\_Levy](https://discourse.ats-lang.org/u/Shea_Levy)
#### Post date: [August 30, 2014, 4:33am UTC](https://discourse.ats-lang.org/t/ats-packname/645/3 "2014-08-30T04:33:18Z")

</div>

I see, thank you.On Sat, Aug 30, 2014 at 12:22:07AM -0400, Hongwei Xi wrote:

> Say you declare a function in a file XYZ.dats:
> 
> extern fun foo (…): …
> 
> The ATS compiler generates a global name for foo  
> using the full path of XYZ.dats, which is often hard to read.
> 
> If the flag ATS\_PACKNAME is set, then the global name for foo  
> is ${ATS\_PACKNAME}foo, where ${ATS\_PACKNAME} is the string  
> value of ATS\_PACKNAME.
> 
> On Sat, Aug 30, 2014 at 12:12 AM, Shea Levy [sh...@shealevy.com](mailto:sh...@shealevy.com) wrote:
> 
> > Hi all,
> > 
> > I see many source files have ATS\_PACKNAME #defines. I can guess what to  
> > fill in there for my projects, but how is this used?
> > 
> > ~Shea
> > 
> > –  
> > 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 [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/ats-lang-users/20140830041220.GA9476%40nixos.hsd1.nh.comcast.net](https://groups.google.com/d/msgid/ats-lang-users/20140830041220.GA9476%40nixos.hsd1.nh.comcast.net)  
> > .
> 
> –  
> 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 [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLrDaU\_Gb6VO1UP1%2BuGUFnGGA30BCb%3D5Ntb\_xwnn0X3ALQ%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLrDaU_Gb6VO1UP1%2BuGUFnGGA30BCb%3D5Ntb_xwnn0X3ALQ%40mail.gmail.com).
