![kueller](/assets/img/avatar_default.png)
git-svn-id: svn://svn.compuextreme.de/Viitor/V961/Viitor_cc65@4236 504e572c-2e33-0410-9681-be2bf7408885
60 lines
1.5 KiB
HTML
60 lines
1.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20">
|
|
<TITLE>Commodore 16/116 specific information for cc65: Other hints</TITLE>
|
|
<LINK HREF="c16-8.html" REL=next>
|
|
<LINK HREF="c16-6.html" REL=previous>
|
|
<LINK HREF="c16.html#toc7" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="c16-8.html">Next</A>
|
|
<A HREF="c16-6.html">Previous</A>
|
|
<A HREF="c16.html#toc7">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s7">7.</A> <A HREF="c16.html#toc7">Other hints</A></H2>
|
|
|
|
|
|
|
|
<H2><A NAME="ss7.1">7.1</A> <A HREF="c16.html#toc7.1">Passing arguments to the program</A>
|
|
</H2>
|
|
|
|
|
|
<P>Command line arguments can be passed to <CODE>main()</CODE>. Since this is not
|
|
supported by BASIC, the following syntax was chosen:</P>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
RUN:REM ARG1 " ARG2 IS QUOTED" ARG3 "" ARG5
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
</P>
|
|
<P>
|
|
<OL>
|
|
<LI>Arguments are separated by spaces.</LI>
|
|
<LI>Arguments may be quoted.</LI>
|
|
<LI>Leading and trailing spaces around an argument are ignored. Spaces within
|
|
a quoted argument are allowed.</LI>
|
|
<LI>The first argument passed to <CODE>main</CODE> is the program name.</LI>
|
|
<LI>A maximum number of 10 arguments (including the program name) are
|
|
supported.</LI>
|
|
</OL>
|
|
</P>
|
|
|
|
|
|
<H2><A NAME="ss7.2">7.2</A> <A HREF="c16.html#toc7.2">Program return code</A>
|
|
</H2>
|
|
|
|
|
|
<P>The program return code (low byte) is passed back to BASIC by use of the
|
|
<CODE>ST</CODE> variable.</P>
|
|
|
|
|
|
|
|
<HR>
|
|
<A HREF="c16-8.html">Next</A>
|
|
<A HREF="c16-6.html">Previous</A>
|
|
<A HREF="c16.html#toc7">Contents</A>
|
|
</BODY>
|
|
</HTML>
|