Hi all,
Is there a general way to import preprocessor-defined constants from C
headers into the statics language? $extval can’t be used there.
~Shea
Hi all,
Is there a general way to import preprocessor-defined constants from C
headers into the statics language? $extval can’t be used there.
~Shea
I also wondered about this. I couldn’t figure out how to do it, so I just
defined it twice (see #define N in
https://github.com/githwxi/ATS-Postiats-contrib/blob/master/contrib/libats-/bbarker/OpenMP/TEST/omp_for.dats).
I agree this is not really satisfactory since it seems error prone.
Brandon Barker
brandon…@gmail.comOn Sun, Aug 31, 2014 at 10:49 PM, Shea Levy sh...@shealevy.com wrote:
Hi all,
Is there a general way to import preprocessor-defined constants from C
headers into the statics language? $extval can’t be used there.~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.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at 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/20140901024939.GC2219%40nixos.hsd1.nh.comcast.net
.
Not sure what you want exactly.
I did something like this a while ago:
https://sourceforge.net/p/ats-lang/code/HEAD/tree/trunk/contrib/glib/HATS/glibconfig_hats
Then I used ‘gcc -E’ to preprocess glibconfig_hats to generate a HATS file
glibconfig.hats, which
can be included in ATS code directly.On Sun, Aug 31, 2014 at 10:49 PM, Shea Levy sh...@shealevy.com wrote:
Hi all,
Is there a general way to import preprocessor-defined constants from C
headers into the statics language? $extval can’t be used there.~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.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at 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/20140901024939.GC2219%40nixos.hsd1.nh.comcast.net
.
The opposite direction is easier.
Say you store the following line in a file mydefine.hats
#define N 100
Then just put the following lines at the beginning of your code:
%{^
#include “define.hats”
%}
#include “define.hats”
It shouldn’t be too bad …On Sunday, August 31, 2014 11:09:18 PM UTC-4, Brandon Barker wrote:
I also wondered about this. I couldn’t figure out how to do it, so I just
defined it twice (see #define N in
https://github.com/githwxi/ATS-Postiats-contrib/blob/master/contrib/libats-/bbarker/OpenMP/TEST/omp_for.dats).
I agree this is not really satisfactory since it seems error prone.Brandon Barker
brand...@gmail.com <javascript:>On Sun, Aug 31, 2014 at 10:49 PM, Shea Levy <sh...@shealevy.com <javascript:>> wrote:
Hi all,
Is there a general way to import preprocessor-defined constants from C
headers into the statics language? $extval can’t be used there.~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...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at 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/20140901024939.GC2219%40nixos.hsd1.nh.comcast.net
.
Ah, that’s a clever approach. I’ll try something like that, thanks!On Sun, Aug 31, 2014 at 11:22:02PM -0400, Hongwei Xi wrote:
Not sure what you want exactly.
I did something like this a while ago:
The ATS PL System / Code / [r3515] /trunk/contrib/glib/HATS/glibconfig_hats
Then I used ‘gcc -E’ to preprocess glibconfig_hats to generate a HATS file
glibconfig.hats, which
can be included in ATS code directly.On Sun, Aug 31, 2014 at 10:49 PM, Shea Levy sh...@shealevy.com wrote:
Hi all,
Is there a general way to import preprocessor-defined constants from C
headers into the statics language? $extval can’t be used there.~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.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at 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/20140901024939.GC2219%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.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at 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/CAPPSPLomq6heBJ10ftgXVGLY8sgTF8vzMdPET4KysfTmjtGSwg%40mail.gmail.com.
That would do it; somehow it never crossed my mind to #include a .hats file.
Brandon Barker
brandon…@gmail.comOn Sun, Aug 31, 2014 at 11:49 PM, gmhwxi gmh...@gmail.com wrote:
The opposite direction is easier.
Say you store the following line in a file mydefine.hats
#define N 100
Then just put the following lines at the beginning of your code:
%{^
#include “define.hats”
%}
#include “define.hats”It shouldn’t be too bad …
On Sunday, August 31, 2014 11:09:18 PM UTC-4, Brandon Barker wrote:
I also wondered about this. I couldn’t figure out how to do it, so I just
defined it twice (see #define N in githwxi (Hongwei Xi) · GitHub
ATS-Postiats-contrib/blob/master/contrib/libats-/
bbarker/OpenMP/TEST/omp_for.dats). I agree this is not really
satisfactory since it seems error prone.Brandon Barker
brand...@gmail.comOn Sun, Aug 31, 2014 at 10:49 PM, Shea Levy sh...@shealevy.com wrote:
Hi all,
Is there a general way to import preprocessor-defined constants from C
headers into the statics language? $extval can’t be used there.~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...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.Visit this group at 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/20140901024939.GC2219%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.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at 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/f0158d51-eb28-4e59-9251-bb4c8a0ca565%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/f0158d51-eb28-4e59-9251-bb4c8a0ca565%40googlegroups.com?utm_medium=email&utm_source=footer
.