繰り返し(while)
名前
while
break
continue
フローチャートに繰り返し(while)を表示する。
構文
while(条件 [, break有 [, continue有 [, True結果
[, False結果 ] ] ] ]){
[ステートメント]
[continue;]
[break;]
};
説明
指定項目 | 内容 |
条件 | 省略不可能。判断シェープに条件の文字列を指定する。 ※文字が枠からはみ出した場合、図形をひし形から六角形に変更して枠内の文字数を増やす。 |
break有 | 省略可能。C言語でwhile文にbreak文が有る場合の処理を記述するのに利用する。文字列を指定する。 |
continue有 | 省略可能。C言語でwhile文にcontinue文が有る場合の処理を記述するのに利用する。文字列を指定する。 |
True結果 | 省略可能。Trueの結果の判定文字列を指定する。 |
False結果 | 省略可能。Falseの結果の判定文字列を指定する。 |
ステートメント | 省略可能。実行される一連のステートメントを指定する。 |
サンプル
//★「while文」の表示 outputfile "フローチャート.xls"; fc("while1"){ output "Sheet1"; terminator("Start"); while("★"){//★while文 proc("処理1"); }; return("End"); }; |
|
//★「while2」の表示 fc("while-break"){ output "Sheet1"; terminator("Start"); while("while","★"){//★while文のbreak処理 proc("処理1"); if("if"){ break;//★while文のbreak処理 }; }; return("End"); }; |
|
//★「while3」の表示 fc("while-continue"){ output "Sheet1"; terminator("Start"); while("while","","★"){//★while文のcontine処理 if("if"){ continue;//★while文のcontine処理 }; proc("処理1"); }; return("End"); }; |
|
//★「while4」の表示 fc("while-条件文字列変更"){ output "Sheet1"; terminator("Start"); while("while","","","★true","★false"){//★while文の //条件文字列変更 proc("処理1"); }; return("End"); }; |