aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-09-06 20:05:41 +0100
committergingerBill <bill@gingerbill.org>2021-09-06 20:05:41 +0100
commit3bf005bfc553ba59d1869c8eab66123748af0b00 (patch)
treea0f80a59ffba25fd834614b56693ae0e7a2ad07b
parentadcb39ef29a89c46ab2b1759a528571c4cf795c0 (diff)
Remove redundant semicolons from comments
-rw-r--r--examples/demo/demo.odin32
1 files changed, 16 insertions, 16 deletions
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin
index 235ee2bdf..c64c54887 100644
--- a/examples/demo/demo.odin
+++ b/examples/demo/demo.odin
@@ -103,9 +103,9 @@ the_basics :: proc() {
// Note: `:=` is two tokens, `:` and `=`. The following are equivalent,
/*
- i: int = 123;
- i: = 123;
- i := 123;
+ i: int = 123
+ i: = 123
+ i := 123
*/
// Constant declarations
@@ -137,7 +137,7 @@ control_flow :: proc() {
// NOTE: Unlike other languages like C, there are no parentheses `( )` surrounding the three components.
// Braces `{ }` or a `do` are always required
for i := 0; i < 10; i += 1 { }
- // for i := 0; i < 10; i += 1 do fmt.print();
+ // for i := 0; i < 10; i += 1 do fmt.print()
// The initial and post statements are optional
i := 0
@@ -478,8 +478,8 @@ explicit_procedure_overloading :: proc() {
add(1, 2, 3) // three parameters
// Ambiguous answers
- // add(1.0, 2);
- // add(1, 2.0);
+ // add(1.0, 2)
+ // add(1, 2.0)
}
struct_type :: proc() {
@@ -701,9 +701,9 @@ union_type :: proc() {
}
new_entity :: proc(T: type) -> ^Entity {
- t := new(T);
- t.derived = t;
- return t;
+ t := new(T)
+ t.derived = t
+ return t
}
*/
}
@@ -1040,7 +1040,7 @@ parametric_polymorphism :: proc() {
fmt.println(r)
r = 123
fmt.println(r)
- r = Error.Foo0 // r = .Foo0; is allow too, see implicit selector expressions below
+ r = Error.Foo0 // r = .Foo0 is allow too, see implicit selector expressions below
fmt.println(r)
}
@@ -1466,7 +1466,7 @@ quaternions :: proc() {
q128: quaternion128 // 4xf32
q256: quaternion256 // 4xf64
q128 = quaternion(1, 0, 0, 0)
- q256 = 1 // quaternion(1, 0, 0, 0);
+ q256 = 1 // quaternion(1, 0, 0, 0)
}
{ // Built-in procedures
q := 1 + 2i + 3j + 4k
@@ -1560,9 +1560,9 @@ where_clauses :: proc() {
fmt.println(cross_3d(x, y))
// Failure case
- // i := [2]bool{true, false};
- // j := [2]bool{false, true};
- // fmt.println(cross_2d(i, j));
+ // i := [2]bool{true, false}
+ // j := [2]bool{false, true}
+ // fmt.println(cross_2d(i, j))
}
@@ -1704,7 +1704,7 @@ deprecated_attribute :: proc() {
}
// NOTE: Uncomment to see the warning messages
- // foo_v1(1);
+ // foo_v1(1)
}
range_statements_with_multiple_return_values :: proc() {
@@ -1826,7 +1826,7 @@ soa_struct_layout :: proc() {
}
{
// SOA Slices
- // Vector3 :: struct {x, y, z: f32};
+ // Vector3 :: struct {x, y, z: f32}
Vector3 :: struct {x: i8, y: i16, z: f32}
N :: 3