18.2.100. PMIx_Value_true
PMIx_Value_true — Determine the boolean interpretation of a
pmix_value_t(5) structure.
18.2.100.1. SYNOPSIS
#include <pmix.h>
pmix_boolean_t PMIx_Value_true(const pmix_value_t *v);
18.2.100.1.1. Python Syntax
No Python equivalent
18.2.100.2. INPUT PARAMETERS
v: Pointer to the pmix_value_t(5) structure to be examined.
18.2.100.3. DESCRIPTION
Examine a pmix_value_t(5) and report whether it represents a boolean “true” or “false”, handling the several ways a boolean can be encoded:
A
typeofPMIX_UNDEFis taken to mean “true” — the mere presence of the attribute implies the value is set.A
typeofPMIX_BOOLreturns the state of the stored flag.A
typeofPMIX_STRINGis parsed for a boolean interpretation. ANULLor empty (whitespace-only) string is treated as “true”. A leading numeric string is “false” when it evaluates to zero and “true” otherwise. The wordsyes,true,y,t, andenable(case insensitive) are “true”;no,false,n,f, anddisableare “false”.
Any value that cannot be interpreted as a boolean is reported as such rather than being forced to true or false.
18.2.100.4. RETURN VALUE
Returns a pmix_boolean_t(5):
PMIX_BOOL_TRUEThe value represents boolean true.PMIX_BOOL_FALSEThe value represents boolean false.PMIX_NON_BOOLThe value cannot be interpreted as a boolean.
18.2.100.5. NOTES
PMIx_Value_true is an OpenPMIx convenience routine.