What does the underscore mean in literal numbers?

后端 未结 4 515
孤独总比滥情好
孤独总比滥情好 2020-12-29 01:22

What does that mean?
0.0..10_000.0

4条回答
  •  礼貌的吻别
    2020-12-29 01:35

    It’s just a syntax convenience to separate the thousands:

    $ ruby -e 'puts 1_000 + 1_000_000'  #=> 1001000
    

提交回复
热议问题