Shop OBEX P1 Docs P2 Docs Learn Events
Conditional Compile — Parallax Forums

Conditional Compile

John CoutureJohn Couture Posts: 370
edited 2008-08-03 20:24 in General Discussion
Wasn't there, at one time, a "conditional compile" command that would allow you to indicate to the compiler to compile this block of code (and thus take up memory) if a constant were set otherwise compile this other block of code.

The application is setting up a program that uses an SX18 processor and a SX28 processor with either a custom PCB or the Prof Dev Board (or any combination thereof).· It has to do with assigning ports to specific functions.

I'm using IDE 3.2.3, SXB 1.51.03

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture

San Diego Miramar College

Comments

  • Sens-a-DatSens-a-Dat Posts: 44
    edited 2008-08-03 16:52
    John,

    Here is what I found tucked away in the "What's New?" of the SX/B Help file (found under the Welcome area).

    ' Example of Conditional Compiling Directives

    '{$DEFINE USE_RB} ' Remove this line to use RC

    '{$IFDEF USE_RB}
    LEDS PIN RB
    '{$ELSE}
    LEDS PIN RC
    '{$ENDIF}


    /Gary
  • John CoutureJohn Couture Posts: 370
    edited 2008-08-03 20:24
    That's it! Thank you!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
Sign In or Register to comment.