Multiple Instances of Single Include File
remeolb
Posts: 79
I have written and include file to control an Onkyo Professional tuner. I have two tuners in the same system and would like to control them both independently. What is the best way to reuse my include file? The only thing I can think of is renaming it and then changing the names of all the variables within so that I do not get an already defined error when I compile. Is there a better way to do this?
0
Comments
Turn it into a module that will control an arbitrary amount of tuners using an arbitrary amount of UIs. The multiple include way with slightly different variable names in each is the path to madness.
Paul
I do this all the time and it works fine.
Just 2 different ways to write code.