In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: I wrestled with this same problem. You can read about it in the "[URL=http://forums.parallax.com/forums/default.aspx?f=7&m=152745]SX/B - Possible File Inclusion BEFORE Program Statement?[/URL]" thread. I wanted to keep things such as IO Pins, Constants, Variables and my ISR in separate files. All of these typically come [B]before[/B] the PROGRAM directive. I was able to accomplish this by chaining these files together. So my main program loads the first file, which for me happens to hold my I/O pin definitions. The first file then loads the second file, which for me holds the definitions for all of my constants. At the end of this file it loads the next one which holds variables. And so on. The trick is that the last one to be loaded in this fashion needs to include the PROGRAM directive! After the PROGRAM directive is encountered you no longer need to chain your files. I am glad to read this will be improved in the next version. I have done it so often I do not give it much thought anymore! - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=194842#m195266 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)