# TDLByte #24 : Actions Increment and Decrement

Discussion in 'Tally & TDL Learning HUB' started by admin, Apr 1, 2016.  Actions Increment and Decrement

TDLByte #24 Dear Developers,

In TDLByte#23, we learnt how to access variable value at different scopes in variable framework. This TDLByte discusses about the actions Increment and Decrement in user defined function.

What is it?

Action Increment increases the specified variable value by 1. Similarly, action
Decrement decreases the specified variable value by 1. A lot can be done in TDL using these actions.

The following illustration shows how to change the variable value using the actions Increment
and Decrement by specified number: Here the value of variable Counter
is 9 i.e. 5+4. Here the value of variable Counter
is 2 i.e. 5-3. Here the value of variable Counter
is 2. Yes, this also works! Increment the value by -3, i.e. 5+ (-3) = 5-3 =2 Here the value of variable Counter
is 7. How? Decrement the value by -2, i.e. 5-(-2) = 5+2 =7

Stay tuned to know more about variable framework!