| ... | ... | @@ -679,7 +679,7 @@ fn divide(a: i32, b: i32) i32 { |
| 679 | 679 | {#header_open|Float Literals#} |
| 680 | 680 | <p> |
| 681 | 681 | Float literals have type <code>comptime_float</code> which is guaranteed to hold at least all possible values |
| 682 | | that the largest other floating point type can hold. Float literals implicitly cast to any other type. |
| 682 | that the largest other floating point type can hold. Float literals {#link|implicitly cast|Implicit Casts#} to any other type. |
| 683 | 683 | </p> |
| 684 | 684 | {#code_begin|syntax#} |
| 685 | 685 | const floating_point = 123.0E+77; |
| ... | ... | @@ -1604,7 +1604,7 @@ test "variable alignment" { |
| 1604 | 1604 | } |
| 1605 | 1605 | } |
| 1606 | 1606 | {#code_end#} |
| 1607 | | <p>In the same way that a <code>*i32</code> can be implicitly cast to a |
| 1607 | <p>In the same way that a <code>*i32</code> can be {#link|implicitly cast|Implicit Casts#} to a |
| 1608 | 1608 | <code>*const i32</code>, a pointer with a larger alignment can be implicitly |
| 1609 | 1609 | cast to a pointer with a smaller alignment, but not vice versa. |
| 1610 | 1610 | </p> |
| ... | ... | @@ -2968,7 +2968,7 @@ test "fn reflection" { |
| 2968 | 2968 | However right now it is hard coded to be a <code>u16</code>. See <a href="https://github.com/ziglang/zig/issues/786">#768</a>. |
| 2969 | 2969 | </p> |
| 2970 | 2970 | <p> |
| 2971 | | You can implicitly cast an error from a subset to its superset: |
| 2971 | You can {#link|implicitly cast|Implicit Casts#} an error from a subset to its superset: |
| 2972 | 2972 | </p> |
| 2973 | 2973 | {#code_begin|test#} |
| 2974 | 2974 | const std = @import("std"); |
| ... | ... | @@ -3101,7 +3101,7 @@ test "parse u64" { |
| 3101 | 3101 | <p> |
| 3102 | 3102 | Within the function definition, you can see some return statements that return |
| 3103 | 3103 | an error, and at the bottom a return statement that returns a <code>u64</code>. |
| 3104 | | Both types implicitly cast to <code>error!u64</code>. |
| 3104 | Both types {#link|implicitly cast|Implicit Casts#} to <code>error!u64</code>. |
| 3105 | 3105 | </p> |
| 3106 | 3106 | <p> |
| 3107 | 3107 | What it looks like to use this function varies depending on what you're |