I wrote:

Therefore, if a variable needs to be set by this value, a post-assignment is used.

The auto grammar detection of Office word suggested me

Therefore, if a variable need to be set by this value, a post-assignment is used.

As I checked google, I found similar constructions like:

If a section or a folder need to be set as private ...

What is the structure here, it seems the need doesn't refer to variable.

  • 1
    It should be "needs." Microsoft Office is not a good option to check grammar. Microsoft office is kinda dumb. On google, did you use quotation marks? and what did you type, in the first place? Click me – Usernew Sep 9 '16 at 13:05
  • @Usernew, thanks, I also think I should say if a variable needs to be set with this value... right? – Ahmad Sep 9 '16 at 14:54
  • 2
    A variable is assigned (with) a value or set to a value. The value doesn't do the assignment or the setting, so by is not the right preposition. – Tᴚoɯɐuo Sep 9 '16 at 18:32
  • @Ahmad Umm...yes. Like TRomano said. I think "by" is also correct. I even checked on googlebooks. I got more results on "by" than "with." – Usernew Sep 10 '16 at 6:34
  • 1
    @Usernew, thanks, However, Tromano suggested set to the value, and assigned with the value. – Ahmad Sep 10 '16 at 6:35

It should be needs for a singular item, or need for plural items. In this case a variable is singular so needs is correct.

Note your second example has a plural: section or folder. If were just one section or one folder then it would need to be needs too, like so:

If a folder needs to be set as private...

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.