|
-
Jun 17th, 2007, 10:12 PM
#1
Thread Starter
PowerPoster
[RESOLVED] Limitation for coding
Few days back I start to work on Microsoft Visual C# 2005, using its express edition. At the same time buy a new for my study material. On the first chapter “Introduction to C#”, I’m really nervous.
It’s about two things.
1.) The maximum number of lines allowed in a C# program is 2097151.
2.) The maximum number of characters per line in a C# program is 2064.
If it is exceeded gives a compile error.
I’m not worried about those numbers. Actually I can’t test this practically; it should be a large application.
Presently I used Java and VB.Net, and never hared about such a limitation on them. May be there are but never I see.
Any way my question is, why such a limitation there. Why that compiler can’t handle it. Please guys comment on this.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Jun 21st, 2007, 10:34 AM
#2
Re: Limitation for coding
It's the way compilers work. A compiler will have its own parser and needs to be able to hold references to line numbers so that some lexical analysis can actually take place on all of the code. Now, obviously, there has to be a bit-representation for that variable to hold all the line numbers, and they are most likely using 22-bits (that comes closest).
After all, it can't work with an infinite amount of lines.
Something similar in logic would be applied to the number of characters per line, since, again, the lexical analysis cannot take place on an infinite number of characters per line, but needs some sort of a limitation.
-
Jun 21st, 2007, 10:11 PM
#3
Thread Starter
PowerPoster
Re: Limitation for coding
I got it, last night go through the parser and lexical analyzer.
Thanks...
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Jun 25th, 2007, 11:00 AM
#4
Re: [RESOLVED] Limitation for coding
Yeah right. You just don't want to admit that you learned something new from my post.
-
Jun 26th, 2007, 10:02 PM
#5
Thread Starter
PowerPoster
Re: [RESOLVED] Limitation for coding
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Jun 27th, 2007, 05:20 AM
#6
Lively Member
Re: [RESOLVED] Limitation for coding
For Big lines you can write that in multiple lines in C# then what is the problem.
You can use different classes for big programs also.
-Rajib
Please Rate every reply if it is useful to u
-
Jun 27th, 2007, 07:09 AM
#7
Thread Starter
PowerPoster
Re: [RESOLVED] Limitation for coding
Actually that what I'm doing now all my Java, VB, C# .... works. I never allow to appear horizontal scroll bar on the IDE which I use. Just I want to why that limitation.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|