Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

I'm looking for a word that describes "to enable or to disable". This related question found the hypernyms mode and state, but I am looking for a verb. I.e. a word for "(potentially) change mode/state".

I guess to switch is a good match, but unfortunately in JavaScript (my target language), switch is a reserved keyword.

What alternatives are there?

share|improve this question

6 Answers 6

up vote 2 down vote accepted

May I suggest "to set availability"? I think it fits well for function names: SetButtonAvailability(), SetOptionAvailability(), etc. It's long, but descriptive...

share|improve this answer

The verb form of toggle can be used to indicate changing state

[no object, with adverbial] Computing switch from one effect, feature, or state to another by using a toggle:
the play/pause button toggles between those functions
[with object]: there are a number of attributes which can be toggled on or off

share|improve this answer
    
I thought of that. The problem of toggle is that it implicitly implies a change to a different state. I want to convey the possibility of staying in the same state. –  Randomblue Feb 4 '13 at 21:18
1  
@Randomblue How can the word describe, as you put it, "change mode or . . . change state" but also encompass "staying in the same state"? –  bib Feb 4 '13 at 21:21
2  
“The problem of ‘toggle’ is that it implicitly implies a change to a different state.” So does “switch”. How can you say, “I guess the verb to switch is a good match,…” if you want to encompass “staying in the same state”? –  Scott Feb 5 '13 at 5:14
1  
togglable even works some places: wordsense.eu/togglable –  Wayfaring Stranger Oct 31 at 16:08
1  
@WayfaringStranger And switchable. –  bib Oct 31 at 16:24

The verb to set just jumped to mind.

share|improve this answer

As I'm new, I'm not allowed to comment or vote up, but I like RegDwigнt's suggestion of set and availability wrapped around the item/control name. For example, I have a Secure Team picker control that I am enabling/disabling in script, and I was wondering what to call it. I'm going to adopt that convention and name the method SetSecureTeamPickerAvailability(). It's a bit long-winded, but very descriptive and self-documenting.

share|improve this answer

I’m not sure I grasp what you’re looking for, but it might be ensure, as in “ensure that the ‘Help’ function is enabled.”  Or possibly affirm, which seems to meld the concepts of “confirm” with the possibility of taking action to change the state.

share|improve this answer

"Toggle" is an excellent word for turning on or off.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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