トップへ戻るニュースフォーラムFLASH-ML 過去ログBak@Flaダウンロードよくある質問と答
ログイン
ユーザ名:

パスワード:


パスワード紛失

新規登録
メインメニュー
メイン
   コーダーズルーム【スクリプト系】
     continue
投稿するにはまず登録を

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
Daigaku
Åê¹ÆNo.7861
投稿日時: 2004-6-2 11:44
新米
居住地: 横浜は藤が丘
投稿: 9
使用環境:
continue
興味本位からお聞きしたいのですが 、continueってどんなときに役に立つのでしょうか?
例えば以下のような抽出系のスクリプトではcontinueを使うメリットってあるんでしょうか?
お教え願います。
//非continue
aTmpArray =new Array( );
aMyArray =["a", "a", "b", "ab", "a", "b", "b", "ab", "a", "a", "ab"];
nLength =aMyArray.length;
for(i =0; i<nLength; i++){
if(aMyArray[i] =="b"){
aTmpArray.push(aMyArray[i]);
}
}

trace(aTmpArray);
//continue使う
aTmpArray =new Array( );
aMyArray =["a", "a", "b", "ab", "a", "b", "b", "ab", "a", "a", "ab"];
nLength =aMyArray.length;
for(i =0; i<nLength; i++){
if(aMyArray[i] !="b"){
continue;
}
aTmpArray.push(aMyArray[i]);
}

trace(aTmpArray);
フラット表示 前のトピック | 次のトピック

題名 投稿者 日時
 » continue Daigaku 2004-6-2 11:44
     Re: continue o-shima 2004-6-2 14:07
       Re: continue Daigaku 2004-6-2 14:52
     Re: continue Fumio 2004-6-2 20:47
     Re: continue rindo 2004-6-2 22:36
       Re: continue Fumio 2004-6-2 22:56
         Re: continue rindo 2004-6-2 23:10
           Re: continue Fumio 2004-6-2 23:47
             Re: continue rindo 2004-6-3 0:00
               Re: continue Fumio 2004-6-3 0:18
                 Re: continue rindo 2004-6-3 7:04
                   Re: continue Fumio 2004-6-3 7:17
                     Re: continue rindo 2004-6-3 7:27
                       Re: continue Fumio 2004-6-3 7:41
                         Re: continue rindo 2004-6-3 7:52
                           Re: continue Fumio 2004-6-3 8:04
                   Re: continue Fumio 2004-6-3 7:52
                     Re: continue rindo 2004-6-3 7:58
                       Re: continue Fumio 2004-6-3 8:09

投稿するにはまず登録を
 
Copyright (C) 2003 FLASH-japan. All rights reserved.
Powered by Xoops