|
hotdog
中级用户
  
积分 411
发帖 78
注册 2003-7-27
状态 离线
|
『楼 主』:
关于choice 命令
使用 LLM 解释/回答一下
choice 命令的返回码为1234……是按什么顺序排的
如choice /c:dme defrag,mem,end
哪个返回码为1
哪个返回码为2
哪个返回码为3
交换次序返回码会变吗
如choice /c:dem defragend,mem
哪为大哥帮忙回答一下
The return code of the choice command is arranged in the order of the specified options. For example, in choice /c:dme defrag,mem,end, the return code for 'd' (defrag) is 1, the return code for'm' (mem) is 2, and the return code for 'e' (end) is 3. If you swap the order, the return code will change. For example, in choice /c:dem defragend,mem, the return code for 'd' (defragend) is 1, the return code for 'e' (end) is 2, and the return code for'm' (mem) is 3.
|
|
2003-8-16 00:00 |
|
|
hotdog
中级用户
  
积分 411
发帖 78
注册 2003-7-27
状态 离线
|
|
2003-8-16 00:00 |
|
|
Roy
管理员
          專業島民
积分 4869
发帖 1633
注册 2002-12-10
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
以下是引用hotdog在2003-8-16 3:12:22的发言:
choice 命令的返回码为1234……是按什么顺序排的
如choice /c:dme defrag,mem,end
哪个返回码为1
哪个返回码为2
哪个返回码为3
交换次序返回码会变吗
如choice /c:dem defrag,end,mem
哪为大哥帮忙回答一下
choice /c:dem defrag,end,mem
^----回码为1
^---回码为2
^--回码为3
The following is a quote from hotdog on 2003-8-16 3:12:22:
What is the order of the return codes for the choice command, like 1234...
For example, choice /c:dme defrag,mem,end
Which return code is 1
Which is 2
Which is 3
Does swapping the order change the return codes?
For example, choice /c:dem defrag,end,mem
Which brother can help answer?
choice /c:dem defrag,end,mem
^----Return code is 1
^---Return code is 2
^--Return code is 3
|

我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
 |
|
2003-8-16 00:00 |
|
|
hotdog
中级用户
  
积分 411
发帖 78
注册 2003-7-27
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
那请问以下为什么要这样写
可以解释一下吗
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag
if errorlevel 2 goto mem
if errotlevel 1 goto end
Then why is it written like this? Can you explain it?
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag
if errorlevel 2 goto mem
if errotlevel 1 goto end
|
|
2003-8-16 00:00 |
|
|
hzy
高级用户
   
积分 578
发帖 135
注册 2003-7-10
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
写成这样比较明燎罢了!
你可以写成这样:
choice /c:dme d,m,e
也可以写成这样:
choice /c:dme
结果是一样的!
It's just that writing it like this is clearer!
You can write it like this:
choice /c:dme d,m,e
It can also be written like this:
choice /c:dme
The result is the same!
|
|
2003-8-16 00:00 |
|
|
hzy
高级用户
   
积分 578
发帖 135
注册 2003-7-10
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
只不过屏幕的提示不同而已!
It's just that the prompts on the screen are different!
|
|
2003-8-16 00:00 |
|
|
Roy
管理员
          專業島民
积分 4869
发帖 1633
注册 2002-12-10
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
以下是引用hotdog在2003-8-16 16:46:38的发言:
那请问以下为什么要这样写
可以解释一下吗
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag
if errorlevel 2 goto mem
if errotlevel 1 goto end
你搞錯了吧.....
是這樣才對吧:
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto end
if errorlevel 2 goto mem
if errotlevel 1 goto defrag
The following is a quote from hotdog on 2003-8-16 16:46:38:
Then may I ask why it is written like this
Can you explain it
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag
if errorlevel 2 goto mem
if errotlevel 1 goto end
You made a mistake.....
It should be like this:
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto end
if errorlevel 2 goto mem
if errotlevel 1 goto defrag
|

我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
 |
|
2003-8-16 00:00 |
|
|
hzy
高级用户
   
积分 578
发帖 135
注册 2003-7-10
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
以下是引用Roy在2003-8-16 17:02:12的发言:
以下是引用hotdog在2003-8-16 16:46:38的发言:
那请问以下为什么要这样写
可以解释一下吗
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag
if errorlevel 2 goto mem
if errotlevel 1 goto end
你搞錯了吧.....
是這樣才對吧:
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto end
if errorlevel 2 goto mem
if errotlevel 1 goto defrag
呵呵!我也没在意;
The following is the speech of Roy on 2003-8-16 17:02:12:
The following is the speech of hotdog on 2003-8-16 16:46:38:
Then, may I ask why it is written like this
Can you explain it
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag
if errorlevel 2 goto mem
if errotlevel 1 goto end
You made a mistake.....
It should be like this:
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto end
if errorlevel 2 goto mem
if errotlevel 1 goto defrag
Hehe! I didn't pay attention either;
|
|
2003-8-16 00:00 |
|
|
xiaojun
银牌会员
    
积分 2202
发帖 499
注册 2003-6-12
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
请问下: 这里的 if errorlevel 3 goto end ; 是指命令的什么地方执行错误就end呢?
Please clarify your specific context. The "if errorlevel 3 goto end" in batch scripting means if the error level of the previous command is greater than or equal to 3, then jump to the label "end". But without the full context of the surrounding batch code, it's hard to be more precise about which specific command's error it refers to. But based on the general syntax, that's the basic meaning. Please provide more context if possible.
|

一年四季,枫叶红了又红;人生四季,失去的,还能再来吗?—— ! |
|
2003-8-16 00:00 |
|
|
zl7322
高级用户
   
积分 871
发帖 269
注册 2003-7-2
状态 离线
|
|
2003-8-16 00:00 |
|
|
hotdog
中级用户
  
积分 411
发帖 78
注册 2003-7-27
状态 离线
|
|
2003-8-16 00:00 |
|
|
xiaojun
银牌会员
    
积分 2202
发帖 499
注册 2003-6-12
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
以下是引用zl7322在2003-8-16 22:42:11的发言:
如果选择3就执行end
这个3在哪儿选择? 批处理它不是依次执行的吗?
The following is a quote from zl7322 on 2003-8-16 22:42:11:
If you choose 3, it will execute end
Where is this 3 chosen? Isn't batch processing executed sequentially?
|

一年四季,枫叶红了又红;人生四季,失去的,还能再来吗?—— ! |
|
2003-8-16 00:00 |
|
|
hotdog
中级用户
  
积分 411
发帖 78
注册 2003-7-27
状态 离线
|
|
2003-8-17 00:00 |
|
|
死性不改
中级用户
  
积分 378
发帖 88
注册 2004-5-5
状态 离线
|
|
2004-6-24 00:00 |
|
|
v70wl
初级用户
 
积分 106
发帖 1
注册 2004-6-21
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
choice命令是什么意思
What does the choice command mean
|
|
2004-6-24 00:00 |
|