# Stropt\_none

**URL:** <https://discourse.ats-lang.org/t/stropt-none/398>\
**Category:** Google Group\
**Created:** [January 24, 2014, 5:52am UTC](https://discourse.ats-lang.org/t/stropt-none/398 "2014-01-24T05:52:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![H\_Zhang](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@H\_Zhang](https://discourse.ats-lang.org/u/H_Zhang)\
**Post date:** [January 24, 2014, 5:52am UTC](https://discourse.ats-lang.org/t/stropt-none/398/1 "2014-01-24T05:52:04Z")

</div>

Is defined as:

(\*  
\*\* HX: [stropt\_none] is just the null pointer  
\*)  
fun stropt\_none (): stropt (~1) = “mac#%”

How do I read it? 🙂 Is that a -1 here? What does “mac#%” refer to? When I  
use mac#% in my own code I get something like undefined reference to  
`_045_’.

Haitao

---

<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:** [January 24, 2014, 6:19am UTC](https://discourse.ats-lang.org/t/stropt-none/398/2 "2014-01-24T06:19:33Z")

</div>

You need to define ‘ATS\_PACKNAME’; ‘%’ is the value of ‘ATS\_PACKNAME’.

Say we have

#define ATS\_PACKNAME “XYZ”

fun stropt\_none (): stropt(~1) = “mac#%”

The function declaration indicates to the compiler that any call  
‘stropt\_none()’  
should be translated into XYZ\_stropt\_none(); ‘mac’ means ‘XYZ\_stropt\_none’  
should not be given a C-interface.On Friday, January 24, 2014 12:57:55 AM UTC-5, H Zhang wrote:

> Should I understand it as that the real stropt\_none is a macro defined in  
> string.cats:
> 
> #define atspre\_stropt\_none() atsptr\_null
> 
> And here is just a mode of the macro. Does “mac#%” preserve the name but  
> require the prefix string to be defined?
> 
> On Thursday, January 23, 2014 9:52:04 PM UTC-8, H Zhang wrote:
> 
> > Is defined as:
> > 
> > (\*  
> > \*\* HX: [stropt\_none] is just the null pointer  
> > \*)  
> > fun stropt\_none (): stropt (~1) = “mac#%”
> > 
> > How do I read it? 🙂 Is that a -1 here? What does “mac#%” refer to? When  
> > I use mac#% in my own code I get something like undefined reference to  
> > `_045_’.
> > 
> > Haitao

---

<div class="post-metadata">

**Author:** ![H\_Zhang](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@H\_Zhang](https://discourse.ats-lang.org/u/H_Zhang)\
**Post date:** [January 24, 2014, 5:57am UTC](https://discourse.ats-lang.org/t/stropt-none/398/3 "2014-01-24T05:57:55Z")

</div>

Should I understand it as that the real stropt\_none is a macro defined in  
string.cats:

#define atspre\_stropt\_none() atsptr\_null

And here is just a mode of the macro. Does “mac#%” preserve the name but  
require the prefix string to be defined?On Thursday, January 23, 2014 9:52:04 PM UTC-8, H Zhang wrote:

> Is defined as:
> 
> (\*  
> \*\* HX: [stropt\_none] is just the null pointer  
> \*)  
> fun stropt\_none (): stropt (~1) = “mac#%”
> 
> How do I read it? 🙂 Is that a -1 here? What does “mac#%” refer to? When  
> I use mac#% in my own code I get something like undefined reference to  
> `_045_’.
> 
> Haitao
