mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-08-03 15:15:37 +00:00
Merge pull request '080: Fix @typeName results in comment' (#271) from felixrabe/exercises:felixrabe-patch-4 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/271
This commit is contained in:
commit
d1ffdd16e8
|
@ -19,12 +19,12 @@
|
||||||
// const MyBar = Bar(); // store the struct type
|
// const MyBar = Bar(); // store the struct type
|
||||||
// const bar = Bar() {}; // create instance of the struct
|
// const bar = Bar() {}; // create instance of the struct
|
||||||
//
|
//
|
||||||
// * The value of @typeName(Bar()) is "Bar()".
|
// * The value of @typeName(Bar()) is "<filename>.Bar()".
|
||||||
// * The value of @typeName(MyBar) is "Bar()".
|
// * The value of @typeName(MyBar) is "<filename>.Bar()".
|
||||||
// * The value of @typeName(@TypeOf(bar)) is "Bar()".
|
// * The value of @typeName(@TypeOf(bar)) is "<filename>.Bar()".
|
||||||
//
|
//
|
||||||
// You can also have completely anonymous structs. The value
|
// You can also have completely anonymous structs. The value
|
||||||
// of @typeName(struct {}) is "struct:<position in source>".
|
// of @typeName(struct {}) is "<filename>.<function>__struct_<nnn>".
|
||||||
//
|
//
|
||||||
const print = @import("std").debug.print;
|
const print = @import("std").debug.print;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user