http://www.dosbox.com/wiki/api.php?action=feedcontributions&user=91.200.222.29&feedformat=atomDOSBoxWiki - User contributions [en]2024-03-28T12:22:22ZUser contributionsMediaWiki 1.34.1http://www.dosbox.com/wiki/index.php?title=Command_Line&diff=3379Command Line2010-01-18T13:31:33Z<p>91.200.222.29: qfXEkr <a href="http://caalhdcvpqxi.com/">caalhdcvpqxi</a>, [url=http://eebwhqnjfsfz.com/]eebwhqnjfsfz[/url], [link=http://rqlltkbxqggg.com/]rqlltkbxqggg[/link], http://knsvxepodlsi.com/</p>
<hr />
<div>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)<br />
<code><pre>echo -%1- 0%10 1%11 2%12</pre></code><br />
On Win98, '''TEST.BAT 99''' produces:<br />
<code><pre>-99- 0990 1991 2992</pre></code><br />
Whereas DOSbox 0.70 produces:<br />
<code><pre>-99- 0990 1 2</pre></code><br />
A work-around is to change TEST.BAT to:<br />
<code><pre>SET X=%1<br />
echo -%X%- 0%X%0 1%X%1 2%X%2</pre></code><br />
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.<br />
<br />
qfXEkr <a href="http://caalhdcvpqxi.com/">caalhdcvpqxi</a>, [url=http://eebwhqnjfsfz.com/]eebwhqnjfsfz[/url], [link=http://rqlltkbxqggg.com/]rqlltkbxqggg[/link], http://knsvxepodlsi.com/</div>91.200.222.29