TDLByte #24 : Actions Increment and Decrement

Discussion in 'Tally.Developer 9 Release 6.0: Videos & TDL Bytes' started by admin, Apr 1, 2016.

         
  1. admin

    admin Administrator Staff Member


    [​IMG]

    [​IMG]

    Actions Increment and Decrement

    TDLByte #24

    [​IMG]

    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:

    [​IMG]

    Here the value of variable Counter
    is 9 i.e. 5+4.

    [​IMG]

    Here the value of variable Counter
    is 2 i.e. 5-3.

    [​IMG]

    Here the value of variable Counter
    is 2. Yes, this also works! Increment the value by -3, i.e. 5+ (-3) = 5-3 =2

    [​IMG]

    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!
     


Share This Page