mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-11-08 11:20:46 -05:00
Manually apply zig fmt
style to comments
This commit is contained in:
parent
882a6b6198
commit
97ae27435b
7 changed files with 8 additions and 10 deletions
|
@ -11,7 +11,7 @@
|
|||
//
|
||||
// a == b means "a equals b"
|
||||
// a < b means "a is less than b"
|
||||
// a !=b means "a does not equal b"
|
||||
// a != b means "a does not equal b"
|
||||
//
|
||||
// The important thing about Zig's "if" is that it *only* accepts
|
||||
// boolean values. It won't coerce numbers or other types of data
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// a == b means "a equals b"
|
||||
// a < b means "a is less than b"
|
||||
// a > b means "a is greater than b"
|
||||
// a !=b means "a does not equal b"
|
||||
// a != b means "a does not equal b"
|
||||
//
|
||||
const std = @import("std");
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
//
|
||||
// Example:
|
||||
//
|
||||
// while (condition) : (continue expression){
|
||||
// while (condition) : (continue expression) {
|
||||
//
|
||||
// if(other condition) continue;
|
||||
// if (other condition) continue;
|
||||
//
|
||||
// }
|
||||
//
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
//
|
||||
// You can force a loop to exit immediately with a "break" statement:
|
||||
//
|
||||
// while (condition) : (continue expression){
|
||||
// while (condition) : (continue expression) {
|
||||
//
|
||||
// if(other condition) break;
|
||||
// if (other condition) break;
|
||||
//
|
||||
// }
|
||||
//
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// writing one of our own:
|
||||
//
|
||||
// fn foo(n: u8) u8 {
|
||||
// return n+1;
|
||||
// return n + 1;
|
||||
// }
|
||||
//
|
||||
// The foo() function above takes a number "n" and returns a number that is
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// example that takes two parameters. As you can see, parameters
|
||||
// are declared just like any other types ("name": "type"):
|
||||
//
|
||||
// fn myFunction( number: u8, is_lucky: bool ) {
|
||||
// fn myFunction(number: u8, is_lucky: bool) {
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
// return GameError.TooManyPlayers;
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
const std = @import("std");
|
||||
|
||||
pub fn main() void {
|
||||
|
|
Loading…
Reference in a new issue