How about an `extern` variable in C?

A million variations exist. I'm looking for a programming-language-agnostic concept. The closest you'll find are templating languages like Handlebars

Delimited continuations? Though I'm not totally clear what you're asking for. Semantics or syntax?

Syntax. Delimited continuations would be a similar concept but for semantics

[deleted]