English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Which preposition in front of “line” — “on”, “in”, “at”?

Given a numbered list of lines of text (in my case an algorithm), should I use "in line" or "at line" to refer to the content of the line?

For example

the code at lines 5-10 loops over the elements of a list


the operation in line 10 sums two positive integers.

share|improve this question

marked as duplicate by Kris, MετάEd, Mahnax, tchrist, Matt E. Эллен Sep 5 '12 at 9:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 4 down vote accepted

I think there are three usages here.

One can talk about a line of code as one entity, for example the "code at line ten".

One can talk about a fragment of code that spans many lines, for example "the code at (or between, or from .. to ..) lines 5-10".

Finally, one can talk about a fragment of code within a line, for example "the object instantiation with a null constructor, which is found in line ten".

share|improve this answer

If referring to a specific line, then "at" would indicate either a statement about the entire line, or possibly about the first element, while "in" would be about a subset of the line.

share|improve this answer

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