From ae5fee63f160643a397d18e9e0658275606bc4d4 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 7 Mar 2023 02:18:26 +0200 Subject: initial commit --- examples/v.ct | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 examples/v.ct (limited to 'examples/v.ct') diff --git a/examples/v.ct b/examples/v.ct new file mode 100644 index 0000000..2026d55 --- /dev/null +++ b/examples/v.ct @@ -0,0 +1,12 @@ +main(argc u32, argv[argc] *u8) i32 +{ + ctx(vec(u32) a); + // equivalent to + ctx(struct (vec[u32]) a); + + // All entities defined with struct [vector] are seen as the same + // structure, i.e. mangled the same. Something like vector_u32 + // If someone adds a name, i.e. structure lol [vector(u32)] the mangling + // is lol_vector_u32 and considered a different type. All identical + // definitions of structs are considered the same struct, in short. +} -- cgit v1.3