2
爲什麼這個字符串不連接?批處理文件字符串串聯
@echo off
set NUM_NODES=4
set ENSEMBLE=127.0.0.1:2181
for /l %%x in (2, 1, %NUM_NODES%) do (
echo %%x
set ENSEMBLE=%ENSEMBLE%,127.0.0.1:2%%x81
)
echo ensemble: %ENSEMBLES%
OUTPUT:
2
3
4
ensemble: 127.0.0.1:2181,127.0.0.1:2481
真棒作品!剛剛讓我從deadend林蔭大道謝謝了 – Stainedart 2013-02-28 14:16:12