![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-14 23:26 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS开发编程 & 发展交流 (开发室) » How to interpret this command? Please give me your advice... |
| Printable Version 2,541 / 1 |
| Floor1 copy114 | Posted 2002-11-11 00:00 |
| 初级用户 Posts 37 Credits 229 | |
|
This is how it is written in the book:
Run CHECKNEW.BAT from another batch program. In the parent batch program, you can include the command: call checknew Suppose the parent batch program receives two replaceable parameters and wants to pass them to checknew.bat. You can use the command call checknew %1 %2 in the parent batch program. Then I want to ask, in which aspect does the influence of these two %1 %2 parameters differ from the original without %1 %2? What can be done to the batch file with these parameters? Modify? Add? Or something else. Please give instructions and give an example, okay????? |
|
| Floor2 yiyesong | Posted 2002-11-17 00:00 |
| 元老会员 Posts 632 Credits 1,987 | |
|
%1, %2, ... are replaceable parameters, which are equivalent to memory variables. %1 is the first parameter after the command, %2 is the second parameter after the command. ... %n is the nth parameter. It can be replaced with actual parameters. For example, DIR /W /P, then %1 = W, %2 = P, and it can also be passed to a sub-batch program. This is particularly useful in batch files. For example, you create an A.BAT with the content: CALL DIR %1 %2, then you execute A /W /P which is equivalent to executing DIR /W /P. Or you create a B.BAT with the content:
IF %1=D GOTO 1 GOTO END :1 DIR :END Then you execute B /D, which executes the DIR command. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |