From fac75575bf615f05bd46aea99f9144e0e5433f46 Mon Sep 17 00:00:00 2001 From: expikr <77922942+expikr@users.noreply.github.com> Date: Thu, 26 Oct 2023 09:34:45 +0800 Subject: [PATCH] Updated Glossary (markdown) --- Glossary.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Glossary.md b/Glossary.md index 5c582e4..705939b 100644 --- a/Glossary.md +++ b/Glossary.md @@ -16,6 +16,26 @@ Structs, enums, unions, and opaques. Zig source files are themselves struct defi Think of containers as where you _declare_ things, which is order-independent, whereas blocks are where you _execute_ things, which is order-dependent. +
+ +```zig +// this is a container +// declarations are simultaneous +opaque { + const b = a+1; + const a = 1; +} + +// this is NOT a container +// executions are sequential +doStuff: { + const b = a+1; // ERROR: a is undefined at this point + const a = 1; +} +``` + +
+ ### ELF "Executable and Linkable Format, formerly named Extensible Linking Format, is a common standard file format for executable files, object code, shared libraries, and core dumps." -[Executable and Linkable Format on Wikipedia](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format)