Declarations of external values & functions from separate file showing up as "undeclared"

34 views
Skip to first unread message

d4v3y_5c0n3s

unread,
Apr 19, 2020, 3:34:15 PM4/19/20
to ats-lang-users
     For roughly a week now, I've been having this issue where PATSCC successfully typechecks my file, but when it tries to compile it to C an error is produced due to GCC not seeing the values/functions that I am using.  These values and functions are declared in a separate file, which is staload-ed in properly.  After some testing, I was able to determine that when my code was inserted into the ATS-contrib SDL library code, no such errors were produced.  This most likely means that the issue is with my Makefile, and not the code itself.  If you'd like to see my code and/or the Makefile, it is available in my Github repository with is linked below.

For anyone who takes the time to try and answer my question, thank you so, so much.  And if you have any questions, just let me know.

The link to my Github repo with full source code is available here: https://github.com/d4v3y5c0n3s/Goldelish-Engine

###  Here's the error message:  ###
In file included from g_audio_dats.c:15:
g_audio_dats.c: In function 'audio_init':
g_audio_dats.c:351:34: error: 'AUDIO_S16' undeclared (first use in this function)
 ATSINSmove(tmpref3, ATSPMVextval(AUDIO_S16)) ;
                                  ^~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:351:21: note: in expansion of macro 'ATSPMVextval'
 ATSINSmove(tmpref3, ATSPMVextval(AUDIO_S16)) ;
                     ^~~~~~~~~~~~
g_audio_dats.c:351:34: note: each undeclared identifier is reported only once for each function it appears in
 ATSINSmove(tmpref3, ATSPMVextval(AUDIO_S16)) ;
                                  ^~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:351:21: note: in expansion of macro 'ATSPMVextval'
 ATSINSmove(tmpref3, ATSPMVextval(AUDIO_S16)) ;
                     ^~~~~~~~~~~~
g_audio_dats.c:369:19: warning: implicit declaration of function 'SDL_InitSubSystem' [-Wimplicit-function-declaration]
 ATSINSmove(tmp10, SDL_InitSubSystem(ATSPMVextval(SDL_INIT_AUDIO))) ;
                   ^~~~~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:369:50: error: 'SDL_INIT_AUDIO' undeclared (first use in this function)
 ATSINSmove(tmp10, SDL_InitSubSystem(ATSPMVextval(SDL_INIT_AUDIO))) ;
                                                  ^~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:369:37: note: in expansion of macro 'ATSPMVextval'
 ATSINSmove(tmp10, SDL_InitSubSystem(ATSPMVextval(SDL_INIT_AUDIO))) ;
                                     ^~~~~~~~~~~~
g_audio_dats.c:401:19: warning: implicit declaration of function 'Mix_OpenAudio' [-Wimplicit-function-declaration]
 ATSINSmove(tmp16, Mix_OpenAudio(ATSPMVi0nt(22050), ATSPMVextval(AUDIO_S16), ATSPMVi0nt(2), ATSPMVi0nt(4096))) ;
                   ^~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:433:19: warning: implicit declaration of function 'Mix_QuerySpec' [-Wimplicit-function-declaration]
 ATSINSmove(tmp22, Mix_QuerySpec(ATSPMVrefarg1(ATSPMVptrof(tmpref2)), ATSPMVrefarg1(ATSPMVptrof(tmpref3)), ATSPMVrefarg1(ATSPMVptrof(tmpref4)))) ;
                   ^~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c: In function 'audio_finish':
g_audio_dats.c:669:27: warning: implicit declaration of function 'Mix_CloseAudio' [-Wimplicit-function-declaration]
 ATSINSmove_void(tmpret25, Mix_CloseAudio()) ;
                           ^~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'
 #define ATSINSmove_void(tmp, command) command
                                       ^~~~~~~
g_audio_dats.c: In function 'audio_sound_play':
g_audio_dats.c:718:19: warning: implicit declaration of function 'Mix_PlayChannel' [-Wimplicit-function-declaration]
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                   ^~~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:718:96: error: 'Mix_Chunk' undeclared (first use in this function)
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                                                                                                ^~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:718:42: note: in expansion of macro 'ATSPMVrefarg1'
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                                          ^~~~~~~~~~~~~
g_audio_dats.c:718:56: note: in expansion of macro 'ATSPMVptrof'
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                                                        ^~~~~~~~~~~
g_audio_dats.c:718:68: note: in expansion of macro 'ATSSELrecsin'
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                                                                    ^~~~~~~~~~~~
g_audio_dats.c:718:81: note: in expansion of macro 'ATSderef'
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                                                                                 ^~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:217:35: error: expected expression before ')' token
 #define ATSderef(pmv, hit) (*(hit*)pmv)
                                   ^
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:718:42: note: in expansion of macro 'ATSPMVrefarg1'
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                                          ^~~~~~~~~~~~~
g_audio_dats.c:718:56: note: in expansion of macro 'ATSPMVptrof'
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                                                        ^~~~~~~~~~~
g_audio_dats.c:718:68: note: in expansion of macro 'ATSSELrecsin'
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                                                                    ^~~~~~~~~~~~
g_audio_dats.c:718:81: note: in expansion of macro 'ATSderef'
 ATSINSmove(tmp27, Mix_PlayChannel(tmp28, ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Chunk), Mix_Chunk, atslab__sample))), arg1)) ;
                                                                                 ^~~~~~~~
g_audio_dats.c:748:19: warning: implicit declaration of function 'Mix_GetError' [-Wimplicit-function-declaration]
 ATSINSmove(tmp36, Mix_GetError()) ;
                   ^~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:35: warning: assignment to 'atstype_ptrk' {aka 'void *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 #define ATSINSmove(tmp, val) (tmp = val)
                                   ^
g_audio_dats.c:748:1: note: in expansion of macro 'ATSINSmove'
 ATSINSmove(tmp36, Mix_GetError()) ;
 ^~~~~~~~~~
g_audio_dats.c: In function 'audio_sound_pause':
g_audio_dats.c:845:27: warning: implicit declaration of function 'Mix_Pause' [-Wimplicit-function-declaration]
 ATSINSmove_void(tmpret37, Mix_Pause(arg0)) ;
                           ^~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'
 #define ATSINSmove_void(tmp, command) command
                                       ^~~~~~~
g_audio_dats.c: In function 'audio_sound_resume':
g_audio_dats.c:875:27: warning: implicit declaration of function 'Mix_Resume' [-Wimplicit-function-declaration]
 ATSINSmove_void(tmpret38, Mix_Resume(arg0)) ;
                           ^~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'
 #define ATSINSmove_void(tmp, command) command
                                       ^~~~~~~
g_audio_dats.c: In function 'audio_sound_stop':
g_audio_dats.c:905:27: warning: implicit declaration of function 'Mix_HaltChannel' [-Wimplicit-function-declaration]
 ATSINSmove_void(tmpret39, Mix_HaltChannel(arg0)) ;
                           ^~~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'
 #define ATSINSmove_void(tmp, command) command
                                       ^~~~~~~
g_audio_dats.c: In function 'audio_music_play':
g_audio_dats.c:953:19: warning: implicit declaration of function 'Mix_FadeInMusic' [-Wimplicit-function-declaration]
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                   ^~~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:953:89: error: 'Mix_Music' undeclared (first use in this function)
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                                                                                         ^~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:953:35: note: in expansion of macro 'ATSPMVrefarg1'
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                                   ^~~~~~~~~~~~~
g_audio_dats.c:953:49: note: in expansion of macro 'ATSPMVptrof'
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                                                 ^~~~~~~~~~~
g_audio_dats.c:953:61: note: in expansion of macro 'ATSSELrecsin'
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                                                             ^~~~~~~~~~~~
g_audio_dats.c:953:74: note: in expansion of macro 'ATSderef'
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                                                                          ^~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:217:35: error: expected expression before ')' token
 #define ATSderef(pmv, hit) (*(hit*)pmv)
                                   ^
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:953:35: note: in expansion of macro 'ATSPMVrefarg1'
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                                   ^~~~~~~~~~~~~
g_audio_dats.c:953:49: note: in expansion of macro 'ATSPMVptrof'
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                                                 ^~~~~~~~~~~
g_audio_dats.c:953:61: note: in expansion of macro 'ATSSELrecsin'
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                                                             ^~~~~~~~~~~~
g_audio_dats.c:953:74: note: in expansion of macro 'ATSderef'
 ATSINSmove(tmp41, Mix_FadeInMusic(ATSPMVrefarg1(ATSPMVptrof(ATSSELrecsin(ATSderef(arg0, Mix_Music), Mix_Music, atslab__handle))), tmp42, ATSPMVi0nt(5000))) ;
                                                                          ^~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:35: warning: assignment to 'atstype_ptrk' {aka 'void *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 #define ATSINSmove(tmp, val) (tmp = val)
                                   ^
g_audio_dats.c:983:1: note: in expansion of macro 'ATSINSmove'
 ATSINSmove(tmp49, Mix_GetError()) ;
 ^~~~~~~~~~
g_audio_dats.c: At top level:
g_audio_dats.c:1063:1: error: redefinition of 'audio_sound_pause'
 audio_sound_pause()
 ^~~~~~~~~~~~~~~~~
g_audio_dats.c:832:1: note: previous definition of 'audio_sound_pause' was here
 audio_sound_pause(atstkind_t0ype(atstype_int) arg0)
 ^~~~~~~~~~~~~~~~~
g_audio_dats.c: In function 'audio_sound_pause':
g_audio_dats.c:1064:1: error: number of arguments doesn't match prototype
 {
 ^
g_audio_dats.c:832:1: error: prototype declaration
 audio_sound_pause(atstkind_t0ype(atstype_int) arg0)
 ^~~~~~~~~~~~~~~~~
In file included from g_audio_dats.c:15:
g_audio_dats.c:1076:27: warning: implicit declaration of function 'Mix_PauseMusic' [-Wimplicit-function-declaration]
 ATSINSmove_void(tmpret50, Mix_PauseMusic()) ;
                           ^~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'
 #define ATSINSmove_void(tmp, command) command
                                       ^~~~~~~
g_audio_dats.c: In function 'audio_music_resume':
g_audio_dats.c:1106:27: warning: implicit declaration of function 'Mix_ResumeMusic' [-Wimplicit-function-declaration]
 ATSINSmove_void(tmpret51, Mix_ResumeMusic()) ;
                           ^~~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:284:39: note: in definition of macro 'ATSINSmove_void'
 #define ATSINSmove_void(tmp, command) command
                                       ^~~~~~~
g_audio_dats.c: In function 'audio_music_stop':
g_audio_dats.c:1143:19: warning: implicit declaration of function 'Mix_FadeOutMusic' [-Wimplicit-function-declaration]
 ATSINSmove(tmp53, Mix_FadeOutMusic(ATSPMVi0nt(5000))) ;
                   ^~~~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c: In function 'audio_music_set_volume':
g_audio_dats.c:1195:53: error: 'MIX_MAX_VOLUME' undeclared (first use in this function)
 ATSINSmove(tmp56, atspre_mul_int_float(ATSPMVextval(MIX_MAX_VOLUME), arg0)) ;
                                                     ^~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:1195:40: note: in expansion of macro 'ATSPMVextval'
 ATSINSmove(tmp56, atspre_mul_int_float(ATSPMVextval(MIX_MAX_VOLUME), arg0)) ;
                                        ^~~~~~~~~~~~
g_audio_dats.c:1200:19: warning: implicit declaration of function 'Mix_VolumeMusic' [-Wimplicit-function-declaration]
 ATSINSmove(tmp55, Mix_VolumeMusic(ATSPMVcastfn(float_to_int, atstkind_t0ype(atstype_int), tmp56))) ;
                   ^~~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c: In function 'audio_music_get_volume':
g_audio_dats.c:1257:60: error: 'MIX_MAX_VOLUME' undeclared (first use in this function)
 ATSINSmove(tmp58, atspre_g0int_mul_int(tmp59, ATSPMVextval(MIX_MAX_VOLUME))) ;
                                                            ^~~~~~~~~~~~~~
/home/d4v3y/ATS2-Postiats-0.4.0/ccomp/runtime/pats_ccomp_instrset.h:276:37: note: in definition of macro 'ATSINSmove'
 #define ATSINSmove(tmp, val) (tmp = val)
                                     ^~~
g_audio_dats.c:1257:47: note: in expansion of macro 'ATSPMVextval'
 ATSINSmove(tmp58, atspre_g0int_mul_int(tmp59, ATSPMVextval(MIX_MAX_VOLUME))) ;

gmhwxi

unread,
Apr 20, 2020, 2:00:46 PM4/20/20
to ats-lang-users

I took a quick look.

You used '#include' in many places.

When a SATS file is included, each of the following kind of code blocks
is discarded.

%{#
...
%}

In general, a SATS file should not be included in another file;
it should be staloaded. Say you have:

foo1.sats
foo2.sats
foo3.sats

You can then create foo_all.hats of the following content:

#staload "foo1.sats"
#staload "foo2.sats"
#staload "foo3.sats"

This foo_all.hats can be included in another file.

How to fix the problem you have now?

First, keep including SATS files as you did.
I suggest that you put all the code blocks of the
following form into a single SATS file called, say,
SDL2_headers.sats:

%{#
...
%}

Then just make sure that this file is staloaded in a file like
g_audio.dats.

By the way, you don't need to compile SATS files. You only
need to compile DATS files. Only when you introduce an exception
constructor in a SATS file, you need to compiler that SATS file.

Hope this helps.

Hongwei Xi

unread,
Apr 20, 2020, 2:18:53 PM4/20/20
to ats-lan...@googlegroups.com
In general, I would say that having just a few SATS files for
a small project is a pretty good design. A common mistake is
to have too many SATS files, potentially creating a lot of confusion.

I almost always start with one SATS file and gradually split it if needed.

Cheers!

--Hongwei



--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/ccb6be7c-f75b-4c74-9cf7-dd0ab0344f33%40googlegroups.com.

d4v3y_5c0n3s

unread,
Apr 20, 2020, 9:57:42 PM4/20/20
to ats-lang-users
Yea, creating too many .sats files definitely makes things very complicated.  The reason I have so many is because I am re-implementing some C code in ATS.  My mistake here was that I did not fully understand the differences between a C .h file and an ATS .sats file.  Also, I avoided using any .hats files because documentation on them is extremely scarce.

Thank you for your reply!  This helps a lot.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lan...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages