Topic Path: Symbol Reference > Classes > TIdThreadSafeInteger Class > TIdThreadSafeInteger Methods > Increment Method > Increment Method (Integer)
ContentsIndexHome
PreviousUpNext
TIdThreadSafeInteger.Increment Method (Integer)

Increases the value of thread-safe data type by the indicated amount.

function Increment(
    const AValue: Integer
): Integer; overload;

Integer - Value for the data type prior to incrementing.

Increment is an Integer function used to increase the Value of the thread-safe data type by the specified value. 

Increment calls Lock to enable the resource protection capabilities of the object instance prior to updating the associated value for the data type. Increment calls Unlock to disable resource protection when the value is successfully updated, or an exception is raised. 

Use Decrement to decrease the value of the thread-safe data type.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.