how top make a library for a modual


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: how top make a library for a modual

    i have made a "myfile.bas" where i have common subroutines and use common variables for specific added hardware modules, these are stated as " include ' in the main program code.

    the main program calls the subroutines as required.

    PB3 compiles the file , how ever the hex output when tested , shows that subroutines are being executed prior to being called from the main program.

    its seems clear that from the point of where put the " include myfile.bas" in the main program it just jumps to that point and executes all the subs within "myfile.bas" without being called by the program

    What am i missing to make it work correctly as if it were part of the main program but allow standard subrontines to be stored in "myfile.bas " and compile correctly.

    cheers

    sheldon

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: how top make a library for a modual

    You need to put on top of include GOTO OverMyInclude, and put label OverMyInclude on end of it.
    Look at any Darrel's include.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: how top make a library for a modual

    Without seeing your code I will bet you did not jump to the end of the include file.

    MyInclude.bas
    Code:
    GOTO MyIncludeEnd
    'Sub Routines
    MyIncludeEnd:
    Dave
    Always wear safety glasses while programming.

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