Announcement

Collapse
No announcement yet.

PB IDE source code line limit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PB IDE source code line limit

    Just wasted half a day cutting & pasting my code from one .BAS file
    into a bunch of .INC files. PB IDE started complaining about a 16K line
    limit for the source file.

    Does the compiler itself have a line limit, or is it just the IDE?

    Suggestion for wish list:

    Ability to scan/display subs/functions in the drop down list from
    any include files or (I know its been requested) static libs (as
    long as the source files for them are referenced, maybe with REMmed
    tags?).




    ------------------
    Bernard Ertl
    Bernard Ertl
    InterPlan Systems

  • #2
    Yes the compiler has a size of source code limit. Just where
    you hit that limit depends on your program.

    I have hit the limit with as few as 30000 lines of code
    and also have had as many 58000 lines of code before hitting
    the limit. Whne you hit the limit you will get compile time
    errors or even run time errors that are just strange. Something
    like END FUNCTION will be reported as an illegal function call.
    You might get an out of memory error when you try to compile.

    The PBDLL compiler is a 16 bit program, being 16 bit greatly
    limits how large a program it can compile. It is sort of
    odd that a 16 bit compiler is making 32 bit programs but that
    is the way it is.

    When you hit that limit you can always break your program
    up into one main program and several helper DLL files.

    The PBDLL editor is a very small program but it has its
    limits, I went out and bought Visual Slick Edit and use it
    for my PBDLL editor. Visaul Slick Edit is a wonderful
    big BLOATED 32 bit editor monster program whos only limits
    are windows resources. I have had 600000 lines of source code
    loaded up in that thing as it did not break a sweat



    ------------------

    Comment


    • #3
      The IDE has a line limit of 16k lines per module. This is scheduled to be increased in the next IDE update.

      The compiler has limits too, but in normal circumstances it is usually substantially larger than the IDE's line limit (or #INCLUDE files would not work with larger apps!). There is no precise line number limit for the compiler, but a limit of available memory - this is because hitting the limit will be dependent on the code being compiled.

      As Tim noted, the PB/DLL compiler is actually a 16-bit application, so it has an effective limit of 16Mb of memory, however, under Windows 9x/ME, other 16-bit tasks can reduce the amount of memory available to PB/DLL. IOW, Windows NT/2000 can usually enable larger apps to be compiled than Win9x/ME (since NT/2000 can provide seperate 16Mb memory blocks to each 16-bit task).

      Usually when the compilers memory is depleted, an out of memory error occurs, however, there are circumstances where this can be conveyed as some other form or error.

      R&D are aware of the effects of low memory on the compiler, and it is likely that future editions will be able to compile much larger apps, and report memory problems more accurately.

      In the mean time, creating DLL's is a fairly easy way of 'growing' very large applications.


      ------------------
      Lance
      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      Lance
      mailto:[email protected]

      Comment


      • #4
        Of course I can't tell for sure but I think I hit an upper limit of 640kB compiled code.
        Everytime my project hits that ceiling I have to move some code to a DLL.


        Peter.


        ------------------
        [email protected]
        [email protected]

        Comment


        • #5
          640Kb???? Are you sure you are not using PB/DOS?

          Seriously, conventional memory limits have NOTHING to do compiling PB/DLL or PB/CC code... it you hit a 640k memory limit, then you have something seriously wrong with the memory manager in your PC.



          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment


          • #6

            Hi, Lance

            I will unlimited lines of code IDE per module
            Support units (precompiled modules)

            Greets
            Stephane



            ------------------

            Comment


            • #7
              Lance,

              Have you ever seen an EXE file made by PBDLL that
              was over 640K in size, that was not puffed up with a
              big resource file?

              I do not use resource files and so far I have always hit
              the memory limit before the compiled EXE has reached the
              640K size.

              I doubt there is a 640k limit, it most likely just by
              sheer luck we run out of mememy when our source code reaches
              a size that it is generating EXE files of around 600K.

              My largest EXE size so far is 628K.

              ------------------

              Comment


              • #8
                Lance,

                yes, the compiled file is around 2Mb but the compiled code (first value given by the compiler) is close to 640Kb. Never could get it to compile over 640Kb but I'm not trying very hard, I just move some source to a DLL to get it going again.

                Peter.


                ------------------
                [email protected]
                [email protected]

                Comment


                • #9
                  I have wrote some big apps with PB/DLL although never had to surpass the 250k limit. I just plug in a couple of DLL's alongside, no speed difference and easier to maintain.

                  Ya know what Dave Navarro posted once? "...write less code"

                  Cheers,

                  ------------------
                  Kev G Peel
                  KGP Software, Bridgwater, UK.
                  http://www.kgpsoftware.com
                  kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

                  Comment

                  Working...
                  X