5

In the introduction to K&R there is the following text:

Similarly, C offers only straightforward, single-thread control flow: tests, loops, grouping, and subprograms, but not multiprogramming, parallel operations, synchronization, or coroutines.

What does grouping refer to? It is not in the index, and searches have been unfruitful so far. I've programmed some C (though I'm far from an expert), and haven't heard the term before.

  • 1
    My guess is structs. – whatsisname Nov 19 '14 at 6:24
  • 1
    @whatsisname I don't think so, as it's referring to control flow, not data structures. – Matthew Finlay Nov 19 '14 at 7:11
  • 1
    FYI K&R is ancient compared to the current C standard, it's only useful these days as a historical guide – ratchet freak Nov 19 '14 at 9:11
  • 1
    @ratchetfreak I disagree. The second edition is still the best published C book ever. It is a compact book that demonstrates how to write modular ANSI C code. Are there really so many changes between ANSI C and and C11? – sakisk Nov 19 '14 at 12:15
7

"C program source text is free-format, using the semicolon as a statement terminator and curly braces for grouping blocks of statements." (Wikipedia)

Blocks don't look like control flow, but they are; without the curly braces only the next line would be controlled by a loop keyword, but with the braces the entire block is looped over.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.