Announcement

Collapse
No announcement yet.

Number max of code line ?

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

  • Number max of code line ?

    Hello

    I'm dealing with a strange problem.
    My code have 2063 lines.

    In a classic function
    this code is present:
    HTML Code:
    func ProcessEnroll(var RowUser)
    
    var state, x, y;
    var w,f,n; 
    var bExit;  
    
    gfx_Cls();
    txt_MoveCursor(2, 0);
    print("Choose the finger");
    
    txt_MoveCursor(2, 1);
    print("LEFT HAND");
    
    txt_MoveCursor(100, 1);
    print("RIGHT HAND");
    
    buttontexts[0]  :=   "THUMB";    
    buttontexts[1]  :=   "THUMB";     
    buttontexts[2]  :=   "INDEX";     
    buttontexts[3]  :=   "INDEX";     
    buttontexts[4]  :=   "MIDDLE";     
    buttontexts[5]  :=   "MIDDLE"; 
    buttontexts[6]  :=   "RING";     
    buttontexts[7]  :=   "RING";  
    buttontexts[8]  :=   "LITTLE";     
    buttontexts[9]  :=   "LITTLE"; 
    
    w := 10;
    from lines 1555 to 1582
    
    When I compile I have no error.
    
    Now if I add a simple line at the end of  the previous code
    [HTML]w := w + 1;
    when I compile I have an error in line 1958 (nothing to see)

    Now if I put in comment the line //buttontexts[9] := "LITTLE"; [/HTML]
    When I compile I have no error.

    If I place another line anywhere I have an error.

    do the 4DGL Workshop 2.4.0.1 have a limitation in number of lines ?
    Any other idea ?

    Regards

    Attached files

  • #2


    It looks like you've run out of code space. On the screen captures of the compiles that had no errors, you used 12,287 bytes and 12,288 bytes of the available 12,288 of code space respectively. Granted, the error message when you (probably) exceeded the available code space was not a good indication of the problem, I think that's what happened.

    Steve
    Any technology, sufficiently developed, is indistinguishable from magic. A.C. Clark(RIP)

    NEW! Lower prices on all 4D Systems products for 2009 and continuing into 2010!
    http://shop.littlepcbsolutions.com

    Comment


    • #3


      Hi

      Many thanks for your answer.
      You are totally right.

      I try to use the file_run function to try to split my code.
      I have several question.

      How built the 4xe file? only by rename the 4dg file or there is something more to do.
      The 4xe give in the example seems to be compiled, should i do the the same thing and how.

      All the example i find have only a main function.
      Can I include data, constant and subfunc in a .4xe file.

      Regards

      Comment


      • #4


        Look in the project folder where your .4dg (4DGL) source code resides. After a successful compile, the Workshop automatically creates a .4xe file with the same file name as your 4DGL source.

        Steve
        Any technology, sufficiently developed, is indistinguishable from magic. A.C. Clark(RIP)

        NEW! Lower prices on all 4D Systems products for 2009 and continuing into 2010!
        http://shop.littlepcbsolutions.com

        Comment


        • #5


          Hello smsmanus

          Thank for your answer.
          When i read it first time, i really not understand because i have no 4xe file in my development folder.

          I have so rebuild a project under the 4DGL programme directory and the 4xe appears.

          So be careful, this file seems to be created inside the Programes/4dgl folder under windows 7 and not in the users document folder.

          Many thanks for you help.

          Regards

          Comment

          Working...
          X