Jump to content

Talk:Block (programming)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Mike Schwartz (talk | contribs) at 21:26, 16 February 2025 (Suggestion for a small change: new section). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Suggestion for a small change

[edit]

The sentence to be changed (perhaps)

[edit]

Currently (in the "Latest revision as of 19:50, 13 November 2024" version of this article), the second sentence of the article says:

Blocks consist of one or more declarations and statements.

An idea for changing that sentence

[edit]

I recommend using a singular noun as the subject of the sentence ("A block" instead of "Blocks"), and specifying a separate number -- zero! -- for the minimum number of declarations per block, while retaining (keeping) the number "one" as the minimum number of statements in a block.

The sentence could instead say:

A block consists of zero or more declarations and one or more statements.

That sentence would then offer more (correct) information, and less [potential] ambiguity. IMHO there would be no harm in (thus) making the sentence easier to [correctly] parse, and harder to misinterpret.

Any comments?

[edit]

Thanks, -- Mike Schwartz (talk) 21:26, 16 February 2025 (UTC)[reply]