thomasoa / andrews-deal

Automatically exported from code.google.com/p/andrews-deal
Other
10 stars 7 forks source link

How to set a global list variable? #31

Open getFaster opened 3 years ago

getFaster commented 3 years ago

I know Deal provides sdev to collect data. However, I need to store data in an array (list), and having to declare many sdev to do that is time consuming and the code will be messy.

This is an example of what wish to do:

main {
    if {...} {
        set hc [hcp north]
        incr bucket($hc)
        accept
    }
}

I tried to set a list outside of the main loop by a for loop, but somehow the loop will be infinity. I am sorry if this is just a TCL script question.