Go to Post Im ready for anything. - davidthefat [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-11-2005, 02:08
dilshan80 dilshan80 is offline
Junior Member
no team
 
Join Date: Nov 2005
Location: Pakistan
Posts: 1
dilshan80 is an unknown quantity at this point
Question [Delphi]Max no of Lines in a pas file

Hi All
I am facing a strange problem, My pas file contains more than 69000 line of code. It compiled successfully but When I apply the break points to debug it appeared in the green colour. Any how it work fine for less than 65535 lines, plz help
  #2   Spotlight this post!  
Unread 29-11-2005, 08:30
Beth Sweet's Avatar
Beth Sweet Beth Sweet is offline
is getting lost in her new home
FRC #0116 (Epsilon Delta), #1504 (alum), #67 (alum)
 
Join Date: Mar 2003
Rookie Year: 2003
Location: Reston, VA
Posts: 1,938
Beth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond reputeBeth Sweet has a reputation beyond repute
Re: Max no of Lines in a pas file

Hi there!
Just wanted to let you know that these are not Delphi forums, but forums for a program called FIRST where both elementry/middle school and high school students design and build a robot to compete in a game that changes every year. While these forums probably won't provide you with the answer to your question, I would urge you to browse both them and the main FIRST website.
__________________
This season, I was a part of a great team, with great kids who were really inspired, and who inspired me back. That's my brag, what's yours?
  #3   Spotlight this post!  
Unread 29-11-2005, 09:38
Ricky Q.'s Avatar Unsung FIRST Hero
Ricky Q. Ricky Q. is offline
yee haw!
FRC #0148 (Robowranglers)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2002
Location: Dallas, TX
Posts: 1,651
Ricky Q. has a reputation beyond reputeRicky Q. has a reputation beyond reputeRicky Q. has a reputation beyond reputeRicky Q. has a reputation beyond reputeRicky Q. has a reputation beyond reputeRicky Q. has a reputation beyond reputeRicky Q. has a reputation beyond reputeRicky Q. has a reputation beyond reputeRicky Q. has a reputation beyond reputeRicky Q. has a reputation beyond reputeRicky Q. has a reputation beyond repute
Send a message via AIM to Ricky Q.
Re: Max no of Lines in a pas file

This thread will also help you:

http://www.chiefdelphi.com/forums/sh...ad.php?t=29944
__________________
Ricky Quinones
Director of Sales - VEX Robotics
  #4   Spotlight this post!  
Unread 29-11-2005, 16:58
Tristan Lall's Avatar
Tristan Lall Tristan Lall is offline
Registered User
FRC #0188 (Woburn Robotics)
 
Join Date: Aug 2001
Rookie Year: 1999
Location: Toronto, ON
Posts: 2,484
Tristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond repute
Re: [Delphi]Max no of Lines in a pas file

As noted above, you've come to the wrong place. However, I might be able to assist.

First of all, why do you have 69000 lines in a single Delphi program? You can use more units (.pas source, precompiled to .dcu) to contain large blocks of extra code, either precompiled or as part of the current project. Even if using a console application (.dpr source), you can link to units using the uses command.

Second, green in a breakpoint can mean one of two things; either disabled (if red text on light green) or invalid (if green text on dark yellow). I've just tested some sample code with over 69000 lines in Delphi 7, and apparently, under some circumstances, breakpoints past a certain line will all be invalid. For me, in the sample program, it occurs at around line 3483, but this depends on the whitespace in the top part of the program. Now, if I use a file with a size of a few hundred more than 65535 lines, it still works fine; somewhere between 65535 and 69000, this problem begins to occur. This suggests an IDE limitation or bug.

So the fix? Use more organized code! You must be using tables of constants, right? You can't possibly be crazy enough to be unrolling loops (while that may work, the benefit is very, very small). If it is constants, try separating them into several units, or using less of them!

Incidentally, I believe that in Turbo Pascal 7.0, there was a hard limit of 65536 lines per file, but Delphi should allow arbitrarily long files.

Here's the code used to generate the lines. I used InitialCode to generate a file full of WriteLn statements, then pasted them into the body of the program.

Code:
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
 
procedure InitialCode;
const
InFile = 'test.pas';
var
A: Cardinal;
F1: TextFile;
begin
Assign(F1, InFile);
Rewrite(F1);
for A := 1 to 69000 do WriteLn(F1, ' WriteLn(''!'');');
CloseFile(F1);
end;
 
begin
WriteLn('!');
WriteLn('!');
WriteLn('!');
WriteLn('!');
// lots of repeated lines: WriteLn('!');
WriteLn('!');
WriteLn('!');
WriteLn('!');
end.

Last edited by Tristan Lall : 29-11-2005 at 17:10.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C HELP PLEASE sglegend11 Programming 4 14-11-2005 21:35
Error in header file p18f8520.h !!! RbtGal1351 Programming 3 17-01-2005 16:03
heres the code. y this not working omega Programming 16 31-03-2004 15:18
File Sharing and Revision Tracking Madison FIRST-related Organizations 14 04-06-2003 18:01
Improving PBASIC: Request for Comments Greg Ross Programming 19 16-02-2002 22:14


All times are GMT -5. The time now is 04:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi