Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ifステートメントに二重の不等式を書くことは可能ですか?
元:if (x <= y <= z) do stuff;
if (x <= y <= z) do stuff;
いいえ-Objective-CはC言語のスーパーセットであり、ifステートメントにCと同じ構文を使用します。これを2つの不等式に分割する必要がありますif (x <= y && y <= z)。
if
if (x <= y && y <= z)