aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-12-12 21:21:55 +0000
committergingerBill <bill@gingerbill.org>2017-12-12 21:21:55 +0000
commit78b459590c5b81ece8747cc2fdbb01e2b8dbdd42 (patch)
tree186e41061bc6d67551953be2f49f2297e55ef5e8 /examples
parentf7e9649be466ea03f556e2918063c5a4d0d28e2e (diff)
Print `nil` for nil procedures in fmt.odin
Diffstat (limited to 'examples')
-rw-r--r--examples/demo.odin10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/demo.odin b/examples/demo.odin
index e218bd7c2..bc84503b0 100644
--- a/examples/demo.odin
+++ b/examples/demo.odin
@@ -40,12 +40,12 @@ general_stuff :: proc() {
i := i32(137);
ptr := &i;
- fp1 := (^f32)(ptr);
+ _ = (^f32)(ptr);
// ^f32(ptr) == ^(f32(ptr))
- fp2 := cast(^f32)ptr;
+ _ = cast(^f32)ptr;
- f1 := (^f32)(ptr)^;
- f2 := (cast(^f32)ptr)^;
+ _ = (^f32)(ptr)^;
+ _ = (cast(^f32)ptr)^;
// Questions: Should there be two ways to do it?
}
@@ -540,7 +540,7 @@ threading_example :: proc() {
threads := make([dynamic]^thread.Thread, 0, len(prefix_table));
defer free(threads);
- for i in 0..len(prefix_table) {
+ for in prefix_table {
if t := thread.create(worker_proc); t != nil {
t.init_context = context;
t.use_init_context = true;