| ... | ... | @@ -1369,6 +1369,13 @@ test "expectError demo" { |
| 1369 | 1369 | {#syntax#}var{#endsyntax#} when declaring a variable. This causes less work for both |
| 1370 | 1370 | humans and computers to do when reading code, and creates more optimization opportunities. |
| 1371 | 1371 | </p> |
| 1372 | <p> |
| 1373 | The {#syntax#}extern{#endsyntax#} keyword or {#link|@extern#} builtin function can be used to link against a variable that is exported |
| 1374 | from another object. The {#syntax#}export{#endsyntax#} keyword or {#link|@export#} builtin function |
| 1375 | can be used to make a variable available to other objects at link time. In both cases, |
| 1376 | the type of the variable must be C ABI compatible. |
| 1377 | </p> |
| 1378 | {#see_also|Exporting a C Library#} |
| 1372 | 1379 | |
| 1373 | 1380 | {#header_open|Identifiers#} |
| 1374 | 1381 | <p> |
| ... | ... | @@ -1396,13 +1403,6 @@ const Color = enum { |
| 1396 | 1403 | }; |
| 1397 | 1404 | const color: Color = .@"really red"; |
| 1398 | 1405 | {#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#} |
| 1406 | 1406 | {#header_close#} |
| 1407 | 1407 | |
| 1408 | 1408 | {#header_open|Container Level Variables#} |