Mojo function
get_defined_bool
get_defined_bool[name: StringSlice[StaticConstantOrigin]]() -> Bool
Try to get a boolean-valued define. Compilation fails if the name is not defined or the value is not a recognized boolean (True, False, 1, 0, on, off).
Parameters:
- โname (
StringSlice): The name of the define.
Returns:
Bool: A boolean parameter value.
get_defined_bool[name: StringSlice[StaticConstantOrigin], default: Bool]() -> Bool
Try to get a boolean-valued define. If the name is not defined, return a default value instead. The value must be a recognized boolean (True, False, 1, 0, on, off).
Parameters:
- โname (
StringSlice): The name of the define. - โdefault (
Bool): The default value to use.
Returns:
Bool: A boolean parameter value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!