Equinox Online Help - Language Reference - A to Z
AtomicIncrement |
|
|---|---|
| Applies to | ![]() |
| Syntax | AtomicIncrement workarea, newvalue |
| Action | [Function] Returns an application-wide unique number |
| Scope | Usable anywhere. |
| Notes | This statement is intended to provide a simpler, faster and more reliable mechanism for supplying an application-wide unique numeric value, and replaces code like the following:> lock publicworkareapublicworkarea += 1 mynewvalue = publicworkareaunlock publicworkarea All numeric workareas are compatible with |
| Category | Maths |
| See Also | |
| Example | This example increments the workarea pwglobalunique and uses it as the next ID for the record being inserted. [Before Any Save]if cuUnique = 0 thenAtomicIncrement pwglobalunique, cuUniqueend if |
