Add extern

This commit is contained in:
Blizzard Finnegan 2024-09-18 09:51:11 -04:00
parent 57be9b511f
commit 13edde611e
Signed by: blizzardfinnegan
GPG key ID: 33BC649AD444BD96

View file

@ -314,3 +314,9 @@ Deprecated; restricts value to a certain space in memory.
`register` is a ***suggestion*** to store this value in a register, dw about it.
`static` limits the visibility of the function, and will keep variable instantiation between function calls.
Useful for only modifying values inside a function, but persisting the values.
---
`extern` specifies to specifically not make storage for it, and it must be defined exactly once as a global variable in another file.
Its great, because you don't need to create a bunch more variables.
But it's also terrible, because of potential race conditions, and non-obvious data connections.