Not every value has an address, but every variable does, how to understand this sentence?

huangapple go评论70阅读模式
英文:

Not every value has an address, but every variable does, how to understand this sentence?

问题

这些句子的理解方式是什么?

  • 哪种值没有地址(不可寻址)?
英文:

One sentence from the book "The Go Programming Language":

> A pointer value is the address of a variable. A pointer is thus the
> location at which a value is stored. Not every value has an address,
> but every variable does. Not every value has an address, but every
> variable does.

How to understand these sentences?

  • Which kind of value has no address (is unaddressable)?

答案1

得分: 1

根据我在这里阅读的内容https://utcc.utoronto.ca/~cks/space/blog/programming/GoAddressableValues

返回函数、方法调用和映射的值是不可寻址的。

详细信息请阅读链接。

英文:

From what I read here https://utcc.utoronto.ca/~cks/space/blog/programming/GoAddressableValues

Values from a return function, method call and map are unaddressable.

Read the link for more detail.

huangapple
  • 本文由 发表于 2022年4月18日 10:01:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/71906921.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定