Forum Discussion
Ger_Hackett_323
Sep 19, 2012Nimbostratus
Increment Array Element
Hi,
Is there any neat way to increment any array element. At the moment I’m doing:
set TempVar $::MyArray($some_index)
incr TempVar
set ::MyArray($some_index) $TempVar
unset TempVar
Thanks,
Ger.
- Kevin_StewartEmployeeYou could potentially one-line it with something like this:
- Kevin_StewartEmployeeYou could potentially one-line it with something like this:
- hooleylistCirrostratusUsing a global array will disable CMP. You might want to check if using a table will work for your scenario as it's CMP compatible:
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects