company logo

Option :: toThreeState - Get three state value for options

Three state options, which may be set to true (1), false (0) or automatic (-1), can be checked by this function.

The function returns the integer value for the state derived from the string value set for the option passed in sOption.

When the option is not defined or does not match any of the valid values, the function returns the default state passed in iDefaultThree.

Return value:  Three state value ( int8  )

Three state values are values, which might be set to three values:

  • 1 - true/yes
  • 0 - false/no
  • -1 - automatic

In many cases, string values can be passed instead of the integer code value.

Implementation details

int32 Option  :: toThreeState ( int32 iDefaultThree )
  • iDefaultThree - Default three state value

    The default three state value can be set to one of the following case insensitive string values

    • 1 - true/yes
    • 0 - false/no
    • -1 - automatic


      optionThreeState("DELETE","true");