Repository navigation
basic/basic_type/function #166
Replies: 5 comments 14 replies
|
可以讲讲闭包函数的使用 |
9 replies
|
请教一下,上面extern那里有一个export的代码示例,请问export是extren的一种形式吗 |
3 replies
|
看第一遍以为所有函数都要标记pub,那为什么不省略掉...,理解错了
|
0 replies
|
这里没明白,编译器怎么会去决定传值方式呢(也有可能我没了解到zig全貌,我是顺着阅读下来的),复合类型值传递,如要要修改,那就传递复合类型的地址过去,我是这么理解的。
|
1 reply
const x: u32 = 1;
const y: u32 = 10;
for (x..y) |i| {
std.debug.print("{s}\n", .{@typeName(@TypeOf(i))});
}为什么这里的类型是 usize 呢?还是说这种语法只能迭代 usize?这里的 u32 相当于转型为 usize 了? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
basic/basic_type/function
简单、快速地学习 Zig,ziglang中文教程,zig中文教程
https://course.ziglang.cc/basic/basic_type/function
All reactions