TutOptionSetEnum


Name

TutOptionSetEnum — set the value of an enumerated option

Synopsis

T_BOOL TutOptionSetEnum(option, enum_val) 
T_OPTION option; 
T_STR enum_val; 

Arguments

option — option to set

enum_val — enumerated value to set option to

Return Values

TRUE if value is set successfully, FALSE otherwise.

Diagnostics

If TutOptionSetEnum fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TutOptionSetEnum sets the enumerated value of option to enum_val.

If no legal values for option have been specified using TutOptionLegValAdd, any value is accepted.

Caution

None

See Also

TutOptionGetEnum

Examples

This example sets the value of the option named enum_opt to the enumerated value red:

T_OPTION enum_opt; 
 
enum_opt = TutOptionLookup("enum_opt"); 
if (enum_opt == NULL) { 
  /* error */ 
} 
 
if (!TutOptionSetEnum(enum_opt, "red")) { 
  /* error */ 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com