
【已解決】求教如何正確添加循環(huán)語(yǔ)句最后由 思想之翼 于 -11-5 19:59下列代碼欲在標(biāo)紅處添加循環(huán)語(yǔ)句,結(jié)果出錯(cuò)。懇望指點(diǎn)如何正確修改。@if(0)==(0) echo offtype e:數(shù)據(jù)101.txt | cscript //nologo //e:jscript %~f0 > e:數(shù)據(jù)201.txtpause & exit@endArray.prototype.contains = function(s){for( var i=0; i < this.length; i++ ){if( s == this ) return true;}return false;}var out =[], max = 0;while( !WSH.StdIn.AtEndOfStream ){var arrLine = WSH.StdIn.ReadLine().split(/s/);//每行按單個(gè)空格或Tab分割數(shù)組for(var i = 0; i < arrLine.length;i++){if( out instanceof Array == false ) out = [];if( out.contains(arrLine) ) continue;//去重復(fù)out.push(arrLine);//數(shù)據(jù)放入二維數(shù)組max = max <out.length ? out.length : max; //求最大行數(shù)}}for( var i = 0; i < max; i++ ){ //行var str = '';for( var j = 0; j < out.length; j++ ){//列str += ( out[j] == undefined ? '' : out[j] ) + 't';}WSH.Echo(str);}@if(0)==(0) echo offFor f = 1 to 441For z = 1 to 100type e:數(shù)據(jù)1 & Right(00 & f, 3) & & Right(00 & z, 3) & .txt | cscript //nologo //e:jscript %~f0 > e:數(shù)據(jù)2 & Right(00 & f, 3) & & Right(00 & z, 3) & .txtpause & exit@end......NextNext

