Go: iota & constant

https://stackoverflow.com/questions/31650192/whats-the-full-name-for-iota-in-golang

 

  1. 一个常量块中,一个常量没有赋值,取上个常量的值

     

     

  2. iota从0开始,每行++

     

     

  3.  

     

  4. 不推荐使用iota

     

     


     

     

posted @ 2022-05-20 12:12  ascertain  阅读(15)  评论(0编辑  收藏  举报