duanrao3371 2013-07-25 10:41
浏览 30
已采纳

符文类型说明

I have found rune type in Go and have a simple question but worth an explnation.

I fount that it is an alias for int32 and purpose is to distinguish number and character values.

http://golang.org/pkg/builtin/#rune

But I am confused with the term "rune" what actually it stands for ? e.g uint == unsigned int

  • 写回答

2条回答 默认 最新

  • douzhi6160 2013-07-25 11:09
    关注

    But I am confused with the term "rune" what actually it stands for ? e.g uint == unsigned int

    Rune stands for letter. ("Runes" are the letters in a set of related alphabets known as runic alphabets, which were used to write various Germanic languages before the adoption of the Latin alphabet. [Wikipedia]).

    If a variable has type rune in Go you know it is intended to hold a unicode code point. (rune is shorter and clearer than codepoint). But it is technical a int32, i.e. its representation in memory is that of an int32.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度