Perlコーディング初心者質問スレ Part 59at PHP
Perlコーディング初心者質問スレ Part 59 - 暇つぶし2ch168:nobodyさん
09/03/04 14:37:04
>>167 了解
ソースその1で動作環境はウェブサーバーで仮に$tensuua=20と$tensuub=20が同時に入力された場合 if→ifの場合のエラーと同じ不具合がおこりえるのかどうか
教えてください。

ソースその1
if ($tensuua < 10) {$ranka = 3;} elsif ($tensuua > 10 and $tensuua < 20) {$ranka = 2;} else {$ranka = 1;}
if ($tensuub < 10) {$rankb = 3;} elsif ($tensuub > 10 and $tensuub < 20) {$rankb = 2;} else {$rankb = 1;}

------------------------------------------------------------------------------------------
ソースその2
if ($tensuua < 10) {$ranka = 3;} elsif ($tensuua > 10 and $tensuua < 20) {$ranka = 2;} elsif ($tensuua < 30) {$ranka = 1;}
elsif ($tensuub < 10) {$rankb = 3;} elsif ($tensuub > 10 and $tensuub < 20) {$rankb = 2;} else {$rankb = 1;}


次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch