gpt4 book ai didi

Go syscall 库代码说明

转载 作者:数据小太阳 更新时间:2023-10-29 03:41:00 26 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





What does a function without body mean?

(1 个回答)


3年前关闭。




谁能解释一下 Go 标准库中 syscall 包中的以下代码?

// /usr/local/Cellar/go/1.10/libexec/src/syscall/syscall.go
//
//
// Getpagesize and Exit are provided by the runtime
func Getpagesize() int
func Exit(code int)

没有函数体,也不是接口(interface)。之后怎么样了?

最佳答案

The Go Programming Language Specification

Function declarations

A function declaration may omit the body. Such a declaration provides the signature for a function implemented outside Go, such as an assembly routine.



阅读文档。

关于Go syscall 库代码说明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49222253/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com