You should, as a general rule, avoid global variables and structures. One way in which you could do this which would sensibly maintain persistent state would be to have a parameter table with a published interface of get_ and set_ functions in a discrete package to maintain this table's setting.