I want to write a code comment that means "every line in this file must be shorter than N". I wrote this:

No line in this file shall be longer than N

...then considered using "must", which is more commonly used:

No line in this file must be longer than N.

Intuitively, for some reason, I read the first as my intended meaning ("lines must be shorter than N"), but the second as "lines do not have to be longer than N), which is different.

I don't know of any rule that would give these two sentences different meanings, it is just how I intuitively parse it. I guess that I am wrong about at least one of them.

Do these two lines have the same meaning? Do they mean "every line must be shorter than N", or "lines can be shorter than N"?

  • @MichaelHarvey I considered clarifying, but figured it doesn't matter for my question and would just take space. I would read it as "shorter or equal" since that's how my math teachers talked, but YMMV. :)
    – Hey
    Oct 27 '19 at 19:59
  • Just realized that you're right, it does actually change the meaning... That wasn't intended, I am asking about the sentence structure and not the N/N-1 problem. I want to know if my sentence constrains all lines, or on the contrary says "the lines do not have a minimum length", if that makes sense.
    – Hey
    Oct 27 '19 at 20:02
  • OK, that was the answer to my badly phrased question, thanks. I wondered if "no line must be longer than N" actually meant "it is not mandatory that lines are longer than N" (i.e "no line is subject to that constraint"), and if that was different depending on the verb (must or shall).
    – Hey
    Oct 27 '19 at 20:06
  • Ah, so it means "no line has a minimum length of N", right?
    – Hey
    Oct 27 '19 at 20:09
  • What's wrong with your original sentence? It says what you mean to express quite well. Why change it? Oct 27 '19 at 20:59

You can use 'every' or 'no' in these ways to express a limit

Every X must/shall be less than Y.


No X shall be greater than Y.

Every suitcase must/shall weigh 15 kilos or less.
No suitcase shall weigh more than 15 kilos.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .