| ... | ... | @@ -1396,6 +1396,13 @@ const Color = enum { |
| 1396 | 1396 | }; |
| 1397 | 1397 | const color: Color = .@"really red"; |
| 1398 | 1398 | {#code_end#} |
| 1399 | <p> |
| 1400 | The {#syntax#}extern{#endsyntax#} keyword or {#link|@extern#} builtin function can be used to link against a variable that is exported |
| 1401 | from another object. The {#syntax#}export{#endsyntax#} keyword or {#link|@export#} builtin function |
| 1402 | can be used to make a variable available to other objects at link time. In both cases, |
| 1403 | the type of the variable must be C ABI compatible. |
| 1404 | </p> |
| 1405 | {#see_also|Exporting a C Library#} |
| 1399 | 1406 | {#header_close#} |
| 1400 | 1407 | |
| 1401 | 1408 | {#header_open|Container Level Variables#} |
| ... | ... | @@ -1465,13 +1472,6 @@ fn foo() i32 { |
| 1465 | 1472 | return S.x; |
| 1466 | 1473 | } |
| 1467 | 1474 | {#code_end#} |
| 1468 | | <p> |
| 1469 | | The {#syntax#}extern{#endsyntax#} keyword or {#link|@extern#} builtin function can be used to link against a variable that is exported |
| 1470 | | from another object. The {#syntax#}export{#endsyntax#} keyword or {#link|@export#} builtin function |
| 1471 | | can be used to make a variable available to other objects at link time. In both cases, |
| 1472 | | the type of the variable must be C ABI compatible. |
| 1473 | | </p> |
| 1474 | | {#see_also|Exporting a C Library#} |
| 1475 | 1475 | {#header_close#} |
| 1476 | 1476 | |
| 1477 | 1477 | {#header_open|Thread Local Variables#} |