This question already outlines what the syntactic differences between "need not" and "do not need to" are.

However, a discussion unfolded below this answer about the following quote from this document:

[...] In order to cause [the] preprocessor to be invoked, it is necessary that the very first line of the program begin with #. Since null lines are ignored by the preprocessor, this line need contain no other information.

Now the question is, which of the following meanings does the emphasised part of that quote have?

The first line is

  1. required not to contain
  2. not required to contain

any other information apart from the initial #.

Personally I feel like the first option is the correct one, but I can't rationally reason why. Could it be that the meaning of "need not" has changed to be more prohibitive in modern English?


The second option is correct; that is, the line is not required to contain any further information.

Programming Explanation

The C/C++ preprocessor is invoked by the presence of a preprocessor directive at the beginning of a line in the source code. For example, a line stating #include foo.h is a directive to the preprocessor pull in the literal source code contained in the external file “foo.h” right then and there during the compilation of the file using that directive. It’s a way to merge source code from several different files into one logical compilation.

The preprocessor ignores empty lines, so it can be invoked by a single # character in the first position of the line, after which it determines that no directive is present and so returns control to the compiler without doing anything at all.

There is presumably some reason for invoking the preprocessor without giving it any immediate function to perform.

That said, you would not want to have characters after the # that could be interpreted by the preprocessor as something it was programmed to act on, such as writing an error message for an unrecognized directive, so your first option is not entirely wrong. The empty line is a directive in its own right.

However, your question was about invoking the preprocessor, not what it did after it had been invoked :)

Military Explanation

A similar situation arises in military drill. The drill commander issues commands in two (possibly three) parts. For example: to command troop number two in a squadron to stand at ease, the commander might call:

  • Introductory, identifies the recipients: "Two troop.",
  • Preparatory, identifies the command about to come: "Stand at....."
  • Execution, a single word identifying the moment to act: "EASE!"

Sometimes a commander will need to change a command before it can be executed. The expression "As you were" that can be used to interrupt the preparatory statement before the execution.

It's also not unknown for a commander to call out the introductory part, alerting the soldiers that something is about to happen, e.g. coming to attention after standing easy to watch a presentation.

If you were writing a realistic manual for drill commanders, you would want to include these cases. You would probably have words to the effect that:

  • You can use the introductory part of the command to alert your soldiers that a command will be coming shortly, and

  • The introductory part need not be followed immediately by a preparatory command,

  • You are strongly advised not to follow the introductory command with garbled and confusing expressions. It gets people really annoyed.

These will not sound exactly right to people who have done military drill (and I'm not talking about drill team choreography here), but that's because people in real life are somewhat more complex than compilers and preprocessors, and their actual use of language is harder to describe.

However, the basic idea is that an expression to get attention (or invoke the preprocessor) does not need to be followed by an expression requiring an action, but that anything that does follow should not be subject to misinterpretation. Silence (an empty line) is sometimes the best bet.

| improve this answer | |
  • @1006a I added an example from how commands are given in military drill, and how the writer of an instruction manual might convey the idea that it was possible to alert people without giving a fullly-formed command. – Global Charm Aug 11 '17 at 20:30
  • This answer contradicts the two comments, according to which the first option is correct, without any backup of this claim. Only the first line of this answer actually addresses my question, the rest is irrelevant and only explains the concept discussed in the C draft, not the actual question about the English language. I appreciate that you wrote such a long answer, but it is not a good one. -1 – iFreilicht Aug 11 '17 at 21:54
  • 1
    @iFreilicht - If the first one were correct, the preprocessor would be broken. A line containing #include “stdlib.h” would be an error because the line contains letters after the #. But this is not the case. The reality is that a line with a bare # is allowed in addition to lines that contain actual preprocessor directives. – Jim Aug 12 '17 at 0:07
  • 1
    @iFreilicht - read “need contain no other” as “does not need to contain any other” and not “needs to not contain any other”... – Jim Aug 12 '17 at 0:10
  • @iFreilicht The problem here is that the writer of the document you were reading did not give a good description of how the preprocessor actually works. My edited answer provided a non-programming example of why such a description is difficult to write. Jim's comment tells you explicitly why the first option is wrong. – Global Charm Aug 12 '17 at 0:15

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.