"From lines 10 to 15" or "from line 10 to line 15"?

In an academic text, I need to explain a section of a computer program. This section extends from line 10 to line 15 in the code. Is the following way to refer to these lines gramatically correct?

  • The scopes of the two declarations overlap from lines 10 to 15.

Or should I use one of these alternative forms:

  • The scopes of the two declarations overlap from line 10 to line 15.
  • The scopes of the two declarations overlap in lines 10 to 15.
  • Any other possibility?...

Because this need appears frequently in the text, this is not just a matter of choosing the safest approach. I woul like to know what is correct and what is not so that I can use some variation trhoughout the text.


Solution 1:

I would definitely go with one of the latter two choices you gave. Personally, I prefer it with in.

Your first example causes me to group 10-15 as a single entity and I parse it as follows (lacking elements shown in parenthesis, glosses underneath):

    from     |   lines 10 to 15   |       (to)        |  (somewhere else)
starting at  |  around this area  |  (and ending at)  |  (this place)

Solution 2:

Drop overlaps. Use is.

  • The scope of the declarations is from line 10 to line 15, inclusive.

  • The scope of the declarations is lines 10 to 15, inclusive.

The inclusive is not necessary for the second one, but it doesn't hurt. It is important for the first one, because to can be ambiguous.

Solution 3:

I find "The scopes of the two declarations" a bit unwieldy as a subject. It is especially awkward with the verb overlap, since overlap is more often a noun, so you can get a bit of a garden path. Another possibility is to use just "the two declarations" (or similar) as the subject, with "in scope" (or similar) as a predicate. "In scope" is also a bit more flexible in that it allows you to specify a certain range or location, while still leaving it clear that the total scope of the declaration extends beyond that range.

So, for example, you might write any of these:

  • From line 10 to line 15, the two declarations are both in scope.
  • Both declarations are in scope from line 10 to line 15.
    • or Both declarations are in scope in lines 10–15.
  • The two declarations have overlapping scopes (lines 10–15).