0

I want to say

This method is only used for there is no real error code.

I think "for" always links "doing", so this sentence is grammatically wrong. Or maybe I could say,

This method is only used for situation that there is no real error code.

But I think it may be clumsy. Or

This method is only used for no real error.

What's your opinion?

2

The word "when" can help you out.

This method is only used when there is no real error code.

This method is only used for situations when there is no real error code.

  • Also, it should be "used only" rather than "only used". "only used" means "When there is no real error code, nothing is done with this method other than using it". – Acccumulation Apr 3 at 2:57
  • I don't think I'm following your logic. – Don B. Apr 3 at 3:06
  • 1
    @Accumulation I don't agree with that. "only used" is equivalent to "used only". – Mixolydian Apr 3 at 3:06
  • @Mixolydian People use the former to mean the latter, but that doesn't mean that there isn't a distinction. – Acccumulation Apr 3 at 3:09
  • 1
    I do agree that "only used" can mean "just used and nothing else" but I also think "used only" can mean the same thing - it depends on the context. – Mixolydian Apr 3 at 3:16
1

for as a conjunction can also be used to introduce the reason for something mentioned in the previous statement

We listened eagerly, for he brought news of our families.
Only this method is used ,for there is no real error code.

The above sentence is correct. But your other two sentences are not idiomatic.

  • There would have to be a comma before "for", and the meaning would be different. "Only this method is used, for there is no real error code." would mean "There is no error code, therefore this method is used." – Acccumulation Apr 3 at 2:56
  • @Acccumulation, oh, I just sense the difference. My original meaning was that "This method only can be used in no-real-error-code situation." The sentence in this answer means "In the no-real-error-code situation, only this method can be used." – Zhang Apr 3 at 5:23
1

You have "only" at the wrong place; it should be "used only".

You need a noun phrase as an object for "for". The reason "doing" works is that it's a gerund, and gerunds act like nouns. If you put "when there is" before the phrase, then that acts like as a noun as well; "when there is no error code" means "the time at which there is no error code". You can also enclose the phrase in quotes, e.g. "This method is only used for 'there is no real error code'.". By enclosing the phrase in quotes, the string of words, rather than their meaning, becomes the object of "for".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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