More than 5 years have passed since last update.
第8章 巨大な式を分割する
巨大な式は理解がしにくいため、巨大な式の結果を格納する「説明変数」を定義する
説明変数名は式を結果を説明する名前にする
複雑な論理条件は、小さな文に分割する
複雑な論理条件が2行よりも多い場合、条件を否定にするなどし条件文の数を削減する
ド・モルガンの法則を用いて論理式を分かりやすいように書く
所感
説明変数を定義して処理の「順番」を読み手に伝えるコーディングを実践していきたい。
Why not register and get more from Qiita?
- We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
- you can read useful information later efficiently
By "stocking" the articles you like, you can search right away
Sign upLogin