View Full Version : Include external .bsp file at compile time?

05-17-2006, 11:18 PM
Can you include a document into a .bsp file at compile time? I'm working on a multi-slot project and I basically want to include all my constant and I/O defintions so I don't have to cut and paste changes.

E.G. can I something like the example below. I checked documentation and didn't see any mention of this for the Stamp Editor,

'---- a file called "mydefs.bsp" ------
Slot CON 127 'spram addresses
Task CON 72
State CON 70
IRk CON 590 'some constants
LEDs VAR DIRA 'some i/o

'---- a file called "MyProgram.bsp" in the same folder
' the line below would be equivalent to actually cutting and pasting
' the defs from above into the document at compile time
#INCLUDE "mydefs.bsp" 'or some such compile syntax
Work VAR Word '
Buffer VAR Byte(5) '
' etc.......

'---- a file called "SomeOtherProgram.bsp" in the same folder
#INCLUDE "mydefs.bsp"
' etc

And both programs would have the defs code inserted on-the-fly at compile time.

Or can anybody recommend any tricks for doing this quickly -- I've changed around some pins and some of my constants several times, and each time I end up cutting-and-pasting my master definitions to 6 or 7 programs.

When the going gets weird, the weird turn pro. -- HST

Chris Savage
05-17-2006, 11:41 PM
Sorry but the IDE doesn't currently support #INCLUDE files. You can copy/paste across tabbed files though.

Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)