2

I want to have an array as a private class member. I use Itcl package.

For lists and other simple variables I was writing:

itcl::class MyClass {
private variable m_myVar ""
private variable m_myListVar {}
..........

Now what I can do for array member?

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
Narek
  • 38,779
  • 79
  • 233
  • 389

1 Answers1

3

I think you should declare the variable as normal using private variable m_myArray and then in the constructor initialize it as an array array set m_myArray {}

ba__friend
  • 5,783
  • 2
  • 27
  • 20