Hmm. I tried rewriting begin/end as initialization/end, but scriptedmain.p still won't compile to an executable. fpc just creates a .PPU file.<div><br></div><div>scriptedmain.p</div><div><a href="https://github.com/mcandre/scriptedmain/tree/master/pascal">https://github.com/mcandre/scriptedmain/tree/master/pascal</a><br clear="all">
<div><br></div>Cheers,<div><br></div><div>Andrew Pennebaker</div><div><a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a></div>
<br><div class="gmail_quote">On Thu, Oct 13, 2011 at 3:40 PM, Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be">jonas.maebe@elis.ugent.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 13 Oct 2011, at 21:37, Andrew Pennebaker wrote:<br>
<br>
> Is it possible to have a begin/end declaration in a unit a la C's main<br>
> function? I would like my units to double as libraries and executables.<br>
<br>
</div>Yes: <a href="http://www.freepascal.org/docs-html/ref/refse72.html" target="_blank">http://www.freepascal.org/docs-html/ref/refse72.html</a><br>
<div><div></div><div class="h5"><br>
<br>
Jonas<br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br></div>