<div dir="ltr">Got it. Thanks Marc!<div>Regards,</div><div>Kashyap</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 27, 2017 at 6:27 AM, Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The order is important.  The Gambit linker (part of gsc) will ensure that the execution of each file's body will be sequenced in the same way as the order of the files on the command line.  So after<br>
<span class=""><br>
   gsc -o out -exe f1.scm f2.scm<br>
<br>
</span>executing out will have the same effect as doing<br>
<br>
   (load "f1.scm")<br>
   (load "f2.scm")<br>
<br>
in the interpreter except that the code will be compiled rather than interpreted.  In many cases the files that compose a program have dependencies and it is important for gsc to obey they ordering so the programmer has some way to specify an order.<br>
<br>
Marc<br>
<div><div class="h5"><br>
<br>
> On Jan 27, 2017, at 9:18 AM, C K Kashyap <<a href="mailto:ckkashyap@gmail.com">ckkashyap@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
> Here's an observation that I have -<br>
><br>
> I have "f1.scm" that defines a function f1 and f2.scm that defines f2 (which calls f1)<br>
><br>
> 1. If I do gsc -o out -exe f1.scm f2.scm - out gets generated but I get the error unbound2/operator not a procedure<br>
><br>
> 2. However, if I do gsc -out f2.scm f1.scm, things work fine<br>
><br>
> So my question is, is that expected as in, I must ensure that the list of files are in the right order (in terms of dependencies)? or am I missing some option?<br>
><br>
> Also, I'd appreciate some pointers to using definitions from another file - I found (##include) - is that the way to go?<br>
><br>
> Regards,<br>
> Kashyap<br>
</div></div>> ______________________________<wbr>_________________<br>
> Gambit-list mailing list<br>
> <a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
> <a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://webmail.iro.umontreal.<wbr>ca/mailman/listinfo/gambit-<wbr>list</a><br>
<br>
</blockquote></div><br></div>