0

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.

5
  • 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
    Commented Sep 9, 2016 at 13:05
  • @Usernew, thanks, I also think I should say if a variable needs to be set with this value... right?
    – Ahmad
    Commented Sep 9, 2016 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.
    – TimR
    Commented Sep 9, 2016 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
    Commented Sep 10, 2016 at 6:34
  • 1
    @Usernew, thanks, However, Tromano suggested set to the value, and assigned with the value.
    – Ahmad
    Commented Sep 10, 2016 at 6:35

1 Answer 1

1

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...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .