Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

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

or

the operation in line 10 sums two positive integers.

share|improve this question
add comment

marked as duplicate by Kris, MετάEd, Mahnax, tchrist, Matt Эллен 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.

2 Answers

up vote 2 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
add comment

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
add comment

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