Difference between revisions of "Command Line"

From DOSBoxWiki
Jump to: navigation, search
(NOTE)
(1)
Line 1: Line 1:
Passing arguments to BAT file does not work exactly the same in DOSbox as is does in other environments (like Win98).  Consider the following file (TEST.BAT)
+
9HDm8b <a href="http://xfvohrhffxsv.com/">xfvohrhffxsv</a>, [url=http://slhvdvxmlnuo.com/]slhvdvxmlnuo[/url], [link=http://ndornfpngdue.com/]ndornfpngdue[/link], http://gyhxteledoqd.com/
<code><pre>echo -%1- 0%10 1%11 2%12</pre></code>
+
On Win98, '''TEST.BAT 99''' produces:
+
<code><pre>-99- 0990 1991 2992</pre></code>
+
Whereas DOSbox 0.70 produces:
+
<code><pre>-99- 0990 1 2</pre></code>
+
A work-around is to change TEST.BAT to:
+
<code><pre>SET X=%1
+
echo -%X%- 0%X%0 1%X%1 2%X%2</pre></code>
+
This coding style has the added benefit of allowing order of arguments to be changed at some future time without major impact on your script.
+
 
+
x5GSAR <a href="http://qsoleqcitpma.com/">qsoleqcitpma</a>, [url=http://cvxkdsxbruom.com/]cvxkdsxbruom[/url], [link=http://pppsztuqynaz.com/]pppsztuqynaz[/link], http://oqqtldppxefs.com/
+

Revision as of 21:35, 16 April 2010

9HDm8b <a href="http://xfvohrhffxsv.com/">xfvohrhffxsv</a>, [url=http://slhvdvxmlnuo.com/]slhvdvxmlnuo[/url], [link=http://ndornfpngdue.com/]ndornfpngdue[/link], http://gyhxteledoqd.com/