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
...
Kevin_Stewart
Sep 19, 2012Employee
You could potentially one-line it with something like this:
array set TempVar { var 1 }
set TempVar(var) [incr TempVar(var)]
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