From 302c4f7409b898ea5c1d63009b883e5887c2ea78 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Sun, 17 Dec 2023 05:01:06 -0500 Subject: [PATCH] clarify offsets of anonymous nested scope, missing quotes for names --- doc/ca65.sgml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/ca65.sgml b/doc/ca65.sgml index 3d4899366..3120d9dd4 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -4998,7 +4998,8 @@ the struct variable itself: Nested structures or unions are treated differently depending on whether they are anonymous. If named, a new structure definition is created within the enclosing scope, with its offsets beginning at 0. If anonymous, the members of -the new structure are added to the enclosing scope instead. Example: +the new structure are added to the enclosing scope instead, with offsets +continuing through that scope. Example: .struct Object @@ -5023,11 +5024,11 @@ O: .tag Object In this example, the first nested structure is named "Point", and its member offsets begin at 0. On the other hand, the two anonymous structures simply -continue to add members to the enclosing Object structure. +continue to add members to the enclosing "Object" structure. Note that an anonymous structure does not need a member name, since all of its members become part of the enclosing structure. The "unnamed" member in the -example is redundantly the same offset as its first member "un1. +example is redundantly the same offset as its first member "un1". Limitations