.. 和 ... 和有什么不一样? [英] What is the difference between .. and ...?
本文介绍了.. 和 ... 和有什么不一样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
标题一目了然:什么时候应该使用双点..
,什么时候应该使用三点...
?两者都用于表示范围.
The title is pretty much self-explanatory: When should one use the double-dots ..
and when the triple-dots ...
? Both are used to indicate a range.
推荐答案
While range with 双点 不包括结束边界,三点用于包含范围,即 (0...2)
将包含 2
以及.这现在已经过时了;为此使用 ..=
代替目的.
While ranges with double dots don't include the end bound, triple dots were used for inclusive ranges, i.e. (0...2)
would contain 2
as well. This is now obsolete; use ..=
for this purpose instead.
这篇关于.. 和 ... 和有什么不一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文