mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
Update 047_methods.zig
This commit is contained in:
@@ -28,6 +28,9 @@
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
// (Actually, you can name the first parameter anything, but
|
||||||
|
// please follow convention and use "self".)
|
||||||
|
//
|
||||||
// 4. Now when you call the method on an INSTANCE of that struct
|
// 4. Now when you call the method on an INSTANCE of that struct
|
||||||
// with the "dot syntax", the instance will be automatically
|
// with the "dot syntax", the instance will be automatically
|
||||||
// passed as the "self" parameter:
|
// passed as the "self" parameter:
|
||||||
|
|||||||
Reference in New Issue
Block a user