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 (%var == 1 or 2 or 3 or 4 or 5) { }
那么你想要检查变量的值是否在 mirc 中的 1-5 之间?
我可以这样做:
if (%var == 1) { } if (%var == 2) { } if (%var == 3) { } if (%var == 4) { } if (%var == 5) { }
但是有没有更短的方法?
惯用的答案是:
if (%var isnum 1-5) { }