Shop OBEX P1 Docs P2 Docs Learn Events
Include external .bsp file at compile time? — Parallax Forums

Include external .bsp file at compile time?

ZootZoot Posts: 2,227
edited 2006-05-17 16:41 in BASIC Stamp
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
LEDcolor     VAR    OUTA
'etc.......

'---- 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

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-17 16:41
    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
Sign In or Register to comment.