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(x >= 0 || x <= MAX)
私は書きたいです:
if(x in [0..MAX])
しかし、それは失敗します。ダートはそのようなものを提供しますか?
現在、コアダートにはシーケンスジェネレーターはありません。しかし、それが存在したとしても、これは悪い考えです。if(x in [0..MAX])チェックでは、xをの各要素と比較する必要がありますが、[0..MAX]これif(x >= 0 || x <= MAX)は2つの比較にすぎません。
[0..MAX]