TransWikia.com

Which preposition in front of "line" — "on", "in", "at"?

English Language & Usage Asked by Em1 on March 19, 2021

The result of a Google search for "error" and "PREP line" is:

  • "error" "on line": 439,000,000 results
  • "error" "in line": 60.600.000 results
  • "error" "at line": 35,800,000 results

While on is the indisputable number one, in and at have also very many hits.

In the following context, which one should I use.

__ the first line you create an instance of XXX and XXX leads to the runtime error __ the last line.

I think, both prepositions are different. Although the word create refers to the action which is executed while runtime, the former part refers to the actual code that is written.
In contrast, the latter part is figurative. I don’t refer to the written code. The error does not really occur in the code but the code is the representation of the assembly which fails.

Thus, I have two bests guess:

On the first line you create an instance of XXX and XXX leads to the runtime error at the last line.

In the first line you create an instance of XXX and XXX leads to the runtime error on the last line.

2 Answers

You may be unaware of the differences commonly implied:

error in line#: you made an error while formulating or typing the line. (parsing/interpretring issue).

error on line #: on reaching the line, you encounter an error probably being inconsistant with preceding logic. (logical/compiler error).

error at line#: likely the compilation or execution is interrupted/ aborted and currently, the pointer is at line#.

In your example, in for the first prep. and at for the second would be appropriate.

Correct answer by Kris on March 19, 2021

I think the first instance should be 'in', since the instance is being declared in the line of code, and that the second one should be 'at', since the error occurs while parsing the last line. The completed sentence IMHO should be

In the first line you create an instance of XXX and XXX leads to the runtime error at the last line.

Answered by hrishioa on March 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP