7

As I study different sections in the C++ standard ( Where do I find the current C or C++ standard documents? ), I would like to refer back to the "Terms and definitions", ยง1.3.

However, the terms and definitions are provided in a form that I cannot adequately understand or interpret, and there is no explanation given in the text regarding how to interpret them.

Consider the very first term that is defined in the "Terms and definitions" section of the standard:

1.3.1 [defns.argument]

argument

actual argument

actual parameter

<function call expression> expression in the comma-separated list bounded by the parentheses

  1. What does [defns.argument] refer to?
  2. What is the meaning and purpose of the lines actual argument and actual parameter?
  3. Does <function call expression> refer to a different "term or definition"? If so, it's not defined in the "Terms and definitions" section - why not? If not, what does it refer to? (NOTE: I am not asking what "function call expression" means, because I already know; instead, I am asking how to read and interpret the "Terms and definitions" section of the C++ standard using this simple example.)
Community
  • 1
  • 1
Dan Nissenbaum
  • 13,558
  • 21
  • 105
  • 181
  • I'm not sure about the rest, but `[defns.argument]` is an "alias" name for the section. Every section has one. I think the idea is simply to have a more meaningful name than only a section number. โ€“ Ari Dec 04 '12 at 17:50

2 Answers2

5
  1. What does [defns.argument] refer to?

    [defns.argument] is the section tag; it is intended to be used for editorial purposes as it is invariant under section renumbering (e.g. in response to insertion, removal or reordering of sections). It can also be used in referring to the standard, but section numbers (relative to a published version of the standard) are more concise.

  2. What is the meaning and purpose of the lines actual argument and actual parameter?

    "actual argument" and "actual parameter" are aliases for the term "argument". You will see below under 1.3.14 [defns.parameter] that "formal argument" and "formal parameter" are aliases for the term "parameter".

    The terms "actual argument" and "actual parameter" only appear in [defns.argument]; "formal argument" is described as an alias in 8.3.5p11, and "formal parameter" is used in approximately 13 places, a small fraction of the number of places where "parameter" is used.

  3. Does <function call expression> refer to a different "term or definition"?

    The angle-bracketed term is the context in which this definition applies. For example, "argument" has a different meaning in the context of a "function call expression" to in the context of a "function-like macro".

ecatmur
  • 152,476
  • 27
  • 293
  • 366
  • One quibble: `[defns.argument]` is not a section name. It's a tag. Definitions, under ISO's rules for drafting, are a bit funky, but other than that, every section has a name. As you say, the tag doesn't change, even if the section moves or gets renamed. โ€“ Pete Becker Dec 04 '12 at 18:41
3

What does [defns.argument] refer to?

That's an alternative way of referring to the section (1.3.1). It should remain the same in future versions of the standard (unless it's removed), while the numbering may change.

What is the meaning and purpose of "actual argument" and "actual parameter"?

They are other terms that you might see, that mean the same thing. I believe that old versions of the spec. used "formal argument" and "actual argument" where the modern spec. uses "parameter" and "argument".

Does <function call expression> refer to a different "term or definition"?

That's the context in which "argument" has this meaning - the following sections give it different meanings in other contexts. Function call expressions are defined in 5.2.2; within such an expression, "argument" means "expression in the comma-separated list bounded by the parentheses".

Mike Seymour
  • 249,747
  • 28
  • 448
  • 644
  • Thank you for the reference to where `function call expression` is defined. This answer also qualifies as the selected answer to this question. โ€“ Dan Nissenbaum Dec 04 '12 at 19:08