company logo

GlobalVariable :: exist - Does global variable exist

The function returns, whether a global variable with the name passed in sGlobalVariable exists or not. The function returns true, when the variable could be located and false otherwise.

In order to avoid exceptions, the function might be called before calling remove() or create().

// fragment

  GlobalVariable  userName("userName");

  if ( !userName.exist() )

    userName.create(Value(""));

  userName.value() = "Paul";

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool GlobalVariable  :: exist (  )