Difference between revisions of "Cmpsetatom"

From OpenEUO
Jump to: navigation, search
(Created page with " local bsuccess = cmpsetatom(str, ev, nv) Compares an atomic variable of name given by string str, with a value ev. If the comparison holds true, the variable will be set to the...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
  local bsuccess = cmpsetatom(str, ev, nv)
 
  local bsuccess = cmpsetatom(str, ev, nv)
Compares an atomic variable of name given by string str, with a value ev.  If the comparison holds true, the variable will be set to the third parameter value, nv.  nv can be a string or a number.  cmpsetatom returns a boolean denoting whether or not the comparison held true.
+
Compares an atomic variable of name given by string str, with a value ev.  If the comparison holds true, the variable will be set to the third parameter value, nv.  nv can be a string or a number (or nil).  cmpsetatom returns a boolean denoting whether or not the comparison held true.
 +
 
 +
[[Getatom]]
 +
 
 +
[[Listatoms]]
 +
 
 +
[[Setatom]]

Latest revision as of 10:00, 9 October 2010

local bsuccess = cmpsetatom(str, ev, nv)

Compares an atomic variable of name given by string str, with a value ev. If the comparison holds true, the variable will be set to the third parameter value, nv. nv can be a string or a number (or nil). cmpsetatom returns a boolean denoting whether or not the comparison held true.

Getatom

Listatoms

Setatom