Rewrote argument parsing

git-svn-id: svn://svn.cc65.org/cc65/trunk@2985 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2004-04-28 08:56:16 +00:00
parent 35a099bb81
commit da3afb7cc7

View File

@@ -251,15 +251,17 @@ Command line arguments can be passed to <tt/main()/. Since this is not
supported by BASIC, the following syntax was choosen: supported by BASIC, the following syntax was choosen:
<tscreen><verb> <tscreen><verb>
RUN:REM,ARG1," ARG2", ARG 3,, ARG5, ... RUN:REM ARG1 " ARG2 IS QUOTED" ARG3 "" ARG5
</verb></tscreen> </verb></tscreen>
<enum> <enum>
<item>Arguments are separated by commas. <item>Arguments are separated by spaces.
<item>There must be a comma after the first <tt/REM/. <item>Arguments may be quoted.
<item>Leading spaces are ignored; trailing spaces are included unless the <item>Leading and trailing spaces around an argument are ignored. Spaces within
argument was quoted. a quoted argument are allowed.
<item>The first argument passed to <tt/main/ is the program name. <item>The first argument passed to <tt/main/ is the program name.
<item>A maximum number of 10 arguments (including the program name) are
supported.
</enum> </enum>
@@ -276,7 +278,7 @@ interrupt handlers. Such routines must be written as simple machine language
subroutines and will be called automatically by the interrupt handler code subroutines and will be called automatically by the interrupt handler code
when they are linked into a program. See the discussion of the <tt/.CONDES/ when they are linked into a program. See the discussion of the <tt/.CONDES/
feature in the <htmlurl url="ca65.html" name="assembler manual">. feature in the <htmlurl url="ca65.html" name="assembler manual">.
<sect>Bugs/Feedback<p> <sect>Bugs/Feedback<p>