An excerpt from Microsoft Writing Style Guide, which I'm trying to follow:
Use
if
to express a condition, usewhether
to express uncertainty, and usewhen
for situations that require preparation or to denote the passage of time. Examples:
- If you don't know whether a network key is needed, contact your network administrator.
- Use your BitLocker recovery key to sign in if you're locked out of your computer after too many failed password attempts.
- When Setup is complete, restart your computer.
- To find out whether TrueType fonts are available ….
- Save a webpage to view it later, even if you're not connected to the internet.
https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/i/if-vs-whether-vs-when
Here is an old version of my text; the version that I have written before trying to follow Microsoft recommendations:
- When you need key–value pairs, use associative arrays.
- Otherwise, use simple ones.
According to Microsoft recommendations, I changed it to
- If you need key–value pairs, use associative arrays.
- Otherwise, use simple ones.
But now it doesn't look syntactically correct to me. The problem is that I think that "if" must not be followed by a plural form. (My primary language is different from English.)
Here is the solution I came to, though I'm not sure it is really good or even correct:
- In situations where you need key–value pairs, use associative arrays.
- Otherwise, use simple ones.
How would you resolve such an issue? Is my solution good?
edit. Here is how simple and associative arrays look:
SimpleArray = ["Value1", "Value2", "Value3"]
AssociativeArray = ["Key1": "Value1", "Key2": "Value2", "Key3": "Value3"]