How to use include files?


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: How to use include files?

    Can one put an Include within an Include file?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: How to use include files?

    Have you tried?

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: How to use include files?

    Well no, but really I'm wondering if there is a limitation. Multiple includes with includes within them. Since it all "happens" before compile time, I suppose it doesn't matter?

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: How to use include files?

    As far as I know - no, it doesn't matter.
    Whatever is in the included file gets put, byte for byte, where the INCLUDE "thisorthatfile.pbp" line is placed so you can have a source file wich includes two other files, which each includes two other files and so on. It's not a good idea to include the SAME file more than once though, if that's a "risk" you need to use conditionals to make sure it's only "compiled in" once even though it's included at several places.

    Disclaimer: I haven't done anything like the above.

    /Henrik.

  5. #5
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: How to use include files?

    The only issue I could see with having lots of include files for standard things, say routines for reading and RTC, writing to an EEPROM, updating an LCD etc is that you wouldn't have much code structure in the main program !

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: How to use include files?

    Agreed Scampy, it could become more difficult to debug if there was some "hidden" conflict since it wouldn't be as readable.

Similar Threads

  1. Post your INCLUDE files here
    By mackrackit in forum Code Examples
    Replies: 4
    Last Post: - 16th September 2011, 23:50
  2. Where are all the INCLUDE files??
    By Heckler in forum General
    Replies: 3
    Last Post: - 13th September 2011, 08:27
  3. Include Files for some Routines
    By rsocor01 in forum PBP Wish List
    Replies: 2
    Last Post: - 23rd April 2010, 19:13
  4. Using ASM files as include
    By Josuetas in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th August 2007, 20:40
  5. Modified include files
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th August 2006, 18:39

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts