Skip to content

Commit 519b3ef

Browse files
committed
Revise spec
1 parent 6c713d2 commit 519b3ef

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

docs/fpp-spec.html

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3665,23 +3665,32 @@ <h4 id="Definitions_Struct-Definitions_Semantics">5.13.2. Semantics</h4>
36653665
identifier appearing in the struct type member sequence must be distinct.</p>
36663666
</div>
36673667
<div class="paragraph">
3668-
<p>The optional expression <code>[</code> <em>e</em> <code>]</code> for a struct member specifies the
3669-
<strong>size</strong> of the member, i.e., the number of elements stored in the member.
3668+
<p>For each member <em>m</em>,</p>
3669+
</div>
3670+
<div class="ulist">
3671+
<ul>
3672+
<li>
3673+
<p>The type name specifies the type \$T_m\$ of the member.</p>
3674+
</li>
3675+
<li>
3676+
<p>The optional expression <code>[</code> <em>e</em> <code>]</code> specifies the
3677+
<strong>size</strong> of <em>m</em>, i.e., the number of elements stored in <em>m</em>.
36703678
If present, <em>e</em> must have a
36713679
<a href="#Types_Internal-Types_Numeric-Types">numeric type</a>, and it must
3672-
evaluate to a value greater than zero after conversion to
3680+
evaluate to a value \$n &gt; 0\$ after conversion to
36733681
<a href="#Types_Internal-Types_Integer"><em>Integer</em></a>.
3674-
If <em>e</em> is not present, then default size is one.
3675-
If a member <em>m</em> has a size specified, then <em>m</em>
3676-
is translated to an array in the implementation language.</p>
3677-
</div>
3678-
<div class="paragraph">
3679-
<p>The optional format specifier for a struct member specifies a
3682+
If <em>e</em> is not present, then <em>m</em> represents a single value of type \$T_m\$.
3683+
Otherwise <em>m</em> represents an array of <em>n</em> values of type \$T_m\$.</p>
3684+
</li>
3685+
<li>
3686+
<p>The optional format specifier specifies a
36803687
<a href="#Format-Strings">format string</a>.
36813688
The format is applied when displaying the struct member.
36823689
There is one argument to the format string, which is the member value.
36833690
If the size of the member is greater than one, then the
36843691
translator applies the format to each element.</p>
3692+
</li>
3693+
</ul>
36853694
</div>
36863695
<div class="paragraph">
36873696
<p>The expression following the keyword <code>default</code> is optional.
@@ -12647,7 +12656,7 @@ <h3 id="Analysis-and-Translation_Translation-Tools">23.4. Translation Tools</h3>
1264712656
</div>
1264812657
<div id="footer">
1264912658
<div id="footer-text">
12650-
Last updated 2026-03-09 11:27:02 -0700
12659+
Last updated 2026-03-09 13:30:08 -0700
1265112660
</div>
1265212661
</div>
1265312662
<script src="code-prettify/run_prettify.js"></script>

docs/spec/Definitions/Struct-Definitions.adoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,20 @@ The definition associates the name _N_ with a
3434
of the specified type. Each
3535
identifier appearing in the struct type member sequence must be distinct.
3636

37-
The optional expression `[` _e_ `]` for a struct member specifies the
38-
*size* of the member, i.e., the number of elements stored in the member.
37+
For each member _m_,
38+
39+
* The type name specifies the type stem:[T_m] of the member.
40+
41+
* The optional expression `[` _e_ `]` specifies the
42+
*size* of _m_, i.e., the number of elements stored in _m_.
3943
If present, _e_ must have a
4044
<<Types_Internal-Types_Numeric-Types,numeric type>>, and it must
41-
evaluate to a value greater than zero after conversion to
45+
evaluate to a value stem:[n > 0] after conversion to
4246
<<Types_Internal-Types_Integer,_Integer_>>.
43-
If _e_ is not present, then default size is one.
44-
If a member _m_ has a size specified, then _m_
45-
is translated to an array in the implementation language.
47+
If _e_ is not present, then _m_ represents a single value of type stem:[T_m].
48+
Otherwise _m_ represents an array of _n_ values of type stem:[T_m].
4649

47-
The optional format specifier for a struct member specifies a
50+
* The optional format specifier specifies a
4851
<<Format-Strings,format string>>.
4952
The format is applied when displaying the struct member.
5053
There is one argument to the format string, which is the member value.

0 commit comments

Comments
 (0)