当前位置: 首页 > news >正文

百度联盟网站有哪些海外建站

百度联盟网站有哪些,海外建站,千万别学计算机网络技术,学校网站建设多少钱定义说明 静态类型(static type):在编码时就能确定的类型,通过变量定义可以确定的类型;动态类型(concrete type):在运行时才能确定具体的数据类型; 动态静态类型如何理…

定义说明

  • 静态类型(static type):在编码时就能确定的类型,通过变量定义可以确定的类型;
  • 动态类型(concrete type):在运行时才能确定具体的数据类型;

动态静态类型如何理解?

go 语言中interface(any)可以承接所有类型的数据,所以这部分只有具体运行的时候,才能确定数据具体类型:

	var i interface{}var num int = 1var str string = "hello world"i = numi= str

在该示例中,第一行声明了一个interface的变量i,在编码时就可以确定了,所以i的静态类型就是interface;
同理,第二行num的静态类型为int,第三行str的静态类型为string
第四行,把num赋值给inum的实际类型是int, 所以此时,i的动态类型就是int
第五行,把str赋值给inum的实际类型是string,所以此时,i的动态类型就是string

Golang 中的interface的底层延申:

golang 中interface有两种含义/用法:

  1. 常规的接口类型,有一些带实现的接口定义
  2. 表示任意数据类型any

golang 的底层实现也是根据这两种情况做了不同的实现,底层分别对应ifaceeface

// 空接口结构
type eface struct {_type *_type			// 实体类型data  unsafe.Pointer	// 数据地址
}// 包含方法的结构
type iface struct {tab  *itab			// 接口和实体类型data unsafe.Pointer	// 数据地址
}type itab struct {inter *interfacetype_type *_typehash  uint32 // copy of _type.hash. Used for type switches._     [4]bytefun   [1]uintptr // variable sized. fun[0]==0 means _type does not implement inter.
}type interfacetype struct {typ     _typepkgpath namemhdr    []imethod
}type imethod struct {name nameOffityp typeOff
}type _type struct {size       uintptrptrdata    uintptr // size of memory prefix holding all pointershash       uint32tflag      tflagalign      uint8fieldAlign uint8kind       uint8// function for comparing objects of this type// (ptr to object A, ptr to object B) -> ==?equal func(unsafe.Pointer, unsafe.Pointer) bool// gcdata stores the GC type data for the garbage collector.// If the KindGCProg bit is set in kind, gcdata is a GC program.// Otherwise it is a ptrmask bitmap. See mbitmap.go for details.gcdata    *bytestr       nameOffptrToThis typeOff
}type nameOff int32
type typeOff int32
type tflag uint8
http://www.yidumall.com/news/49793.html

相关文章:

  • 域名注册服务原则上实行什么郑州seo优化外包顾问阿亮
  • 网站首页设计图凡科网免费建站
  • 网站建设是广告吗百度推广管理平台
  • 制作WordPress主题自适应搜索引擎优化简历
  • 网站建设的原因有什么百度搜索优化
  • 无锡营销型网站价格站长字体
  • 网站用户体验设计友情链接软件
  • 手机移动端网站做多大seo优化怎么做
  • 做网站和推广公司怎么建网页
  • 保定酒店网站制作长春建站程序
  • 珠海免费景点淘宝seo什么意思
  • 一个新手如何做网站江苏网站seo营销模板
  • 专门做音效的网站怎么让百度收录
  • 最早做网页的公司汕头百度seo公司
  • 东莞建设网站的公司彼亿营销
  • wordpress一站式开发seo推广案例
  • 网站推广岗位职责加盟
  • 廊坊app网站制作外链发布工具下载
  • 成品网站5668入口的功能介绍爱站网注册人查询
  • 农业公司网站建设方案站长之家素材
  • 威海做网站的公司网络优化工程师主要负责什么工作
  • 滨州网站建设公司重庆seo代理
  • 网站建设竞价托管外包淘宝关键词搜索工具
  • 自己做网站才是互联网建网站不花钱免费建站
  • 做ppt的网站有哪些内容吗优化关键词推广
  • wordpress设置上传文件大小建设优化网站
  • paypal网站做外贸谷歌app官方下载
  • 山西电商网站开发怎么推广网页
  • 南宁网站建设制作建站模板哪个好
  • 住房与城乡建设管理委员会网站b站免费版入口