wsjxwj 当前离线
少校
set str=I love,bbs;bathome.net for %%a in (%str%) do if %%a==cn echo %%a pause复制代码
TOP
echo off set str=i love,bbs;bathome.net for %%i in (%str%) do echo %%i pause > nul复制代码
echo off set str=i love,bbs;bathome.net for %%i in (i love,bbs;bathome.net ) do echo %%i pause > nul复制代码
qwe23068 当前离线
一级士官
@echo off set str=I love,bbs;bathome.net for %%i in (%str%) do echo %%i pause复制代码
@echo off set "str=I love,bbs;bathome.net" for /f "delims=,;= tokens=4" %%i in ("%str%") do echo %%i pause复制代码
jiasongfu 当前离线
二级士官
@echo off set str=I love,bbs;bathome.net for %%i in (%str:~-2%) do echo %%i pause复制代码
smallbaby 当前离线
@echo off set str=I love,bbs;bathome.net echo 看看: for %%i in (%str%) do if %%i==cn echo %%i pause复制代码
@echo off set str=I love,bbs;bathome.net echo 看看: for %%i in (%str%) do echo %%i pause复制代码
lianfayong 当前离线
set str=I love,bbs;bathome.net for %%i in (%str%) do cls&%%i /for %%i in (%str%) do (set a=%%i) enter echo %a% pause复制代码
dthaoa1 当前离线
zhuzizzq 当前离线
@echo off set str=I love,bbs;bathome.net for %%a in (%str%) do echo %%a pause复制代码
@echo off set str=i love bbs bathome.net for %%a in (%str%) do echo %%a pause复制代码
zlgeng 当前离线
@echo off set str=i love,bbs;bathome.net, for %%i in (%str%) do echo %%i pause 复制代码
hs4814 当前离线
A1:假设令 set str=I love,bbs;bathome.net,请分别显示出I、love、bbs、bathome和cn这五个字符串。目的:了解for语句用到了哪些符号作为元素的分隔符。
A2:条件同A1,要求最后只显示cn这个字符串。目的:了解for语句的执行流程。
nopr 当前离线
@echo off set str=i love,bbs;bathome.net for %%i in (%str%) do echo %%i pause > nul复制代码
@echo off set str=i love,bbs;bathome.net for %%i in (%str%) do echo %%i > a.txt type a.txt & del a.txt pause > nul复制代码
评分人数
wxcute (冰疼)当前离线
荣誉版主