Operating System - Linux
1753876 Members
7152 Online
108809 Solutions
New Discussion юеВ

4GL developer running into an 8000 line limitation

 
SOLVED
Go to solution
Matt Shaffer_1
Regular Advisor

4GL developer running into an 8000 line limitation

I'm not expecting much response on this one. A developer that I work with is writing a 4GL program which reached 8000 lines of code. If he runs the program it errors out (I don't recall the error he got) but if he removes 1 line - which gives his 7999 - the program works fine. He thinks this is an HPUX 11.11 limitation but it sounds more line a 4GL limitation. I told him I'd open up a forum anyway to see if anyone heard of such a limitation. Let me know what you think.

Thanks
Matt
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor

Re: 4GL developer running into an 8000 line limitation

Hi Matt:

You don't provide any details: language, line length, etc. Is it an interpreted language or a compiled one? Is the code modular with functions (subroutines) or is it written top to bottom? If your developer reduces the size of a subroutine does the code work?

Tell your developer to consult the 4GL reference documentation for its inherent limititions.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: 4GL developer running into an 8000 line limitation

This is almost certainly an application limitation (the 4GL compiler) but in any event, 8000 sources lines is considered a big file and doesn't lend itself to re-use. I suspect that nothing more is needed than breaking the program into separate modules and linking them. There is no way that 8000 lines is an HP-UX limitation --- the number is just too pretty. There could well be a hard-coded or configurable limit in the 4GL compiler. (8000 lines could well be a limit that was imposed to protect a programmer from his own stupidity.)
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: 4GL developer running into an 8000 line limitation

>4GL program ... it errors out (I don't recall the error he got)

What 4GL? What was the exact message?
As Clay said, unless the message has something to do with the heap or maxdsiz, it seem quite random it that limitation would fail exactly at 8000.
Matt Shaffer_1
Regular Advisor

Re: 4GL developer running into an 8000 line limitation

I got an email over the weekend from the developer. This is the error that he is getting.

str[] buffer overflow - see 'limits'

He called it a compile time limitation error. I will also research this error to see what I find.

That's all I have for now. Please let me know your thoughts.

thanks
James R. Ferguson
Acclaimed Contributor

Re: 4GL developer running into an 8000 line limitation

Hi Matt:

Your developer needs to provide details and (s)he needs to do some research. Otherwise this becomes a game of twenty questions.

For 'limits' you would want to examine:

/usr/include/limits.h

...along with:

getconf()

http://docs.hp.com/en/B2355-60105/getconf.1.html

sysconf()

http://docs.hp.com/en/B2355-60105/sysconf.2.html

pathconf()

http://docs.hp.com/en/B2355-60105/pathconf.2.html

Regards!

...JRF...
OldSchool
Honored Contributor

Re: 4GL developer running into an 8000 line limitation

well, as noted before...knowing *what* 4gl would be really helpful.

i'd be more inclined for it to be either a 4gl limitation or mis-matched quotes, as the message is a "buffer overflow", but who knows.

the command line that he is using might be helpful as well, incl. all errors / warnings

Dennis Handly
Acclaimed Contributor

Re: 4GL developer running into an 8000 line limitation

>str[] buffer overflow - see 'limits'
>He called it a compile time limitation error.

It would be more helpful if the message was improved. I.e. if it is talking about limits(5), it should say so. And which limit?
http://docs.hp.com/en/B2355-60130/limits.5.html

>Please let me know your thoughts.

I see some limits of 8 K but not 8000.
Matt Shaffer_1
Regular Advisor

Re: 4GL developer running into an 8000 line limitation

.