rberti
30th October 2008, 16:22
Hi all gurus.

I'm having a strange compilation error in tfacp1110 script, seems to be related with the number of the script lines.

When the total lines beyond 31183, compilation generates the error:

"ptfacp11100(31086): Error: '-' not expected."

does anybody had experienced it before?

I've had searched in progguide Known Limits but haven't found nothing about.

Thanks in advance.

_Ralph_
30th October 2008, 21:05
Hi man!

I have no idea about the error's reason.

Here we got the same problem trying to customize this program.

The ugly solutions involves a "diet" for the script :D

starting on changes with the "ifs"(a=b?do.this:do.that)

I have never seem other program with so many lines...

ai carai...:D

mark_h
30th October 2008, 22:17
You mean you actually had to reduce the number of lines in the code? I have never seen a limitation - nor have I ever seen a script so big. Maybe take some routines and make them dll's.

rberti
31st October 2008, 16:03
Use Dll's was my first thought, but I was just curious about the error. Maybe if someone had that before could explain if is realy related with the number of lines or any parameter...
Thanks for the replys guys!

ARijke
31st October 2008, 17:10
I you change the sequence of some functions then another function around line 31000 should give problems if it is about the length of the script. But I also do not know a max length for a script.

günther
5th November 2008, 11:49
I just created some code and tried to compile:
* 100.000 lines just comment -> okay
* 100.000 lines of variable declaration -> Error: '-' not expeced (line 34467)

So it's surely a limit!

Günther

shah_bs
5th November 2008, 21:09
In the simple test that I did, by putting a - sign in the script in one of the functions, I get the same message but the line number it gives is the line number in my program script.

So, my guess is that, by chance, one of the include files has a 'dangling' - sign in them. It could get tedious, but if you can hunt down the - sign, and fix the code surrounding it, may be one way to solve the problem. [If you know any include file that was recently updated in your system, this may help narrow down the search.]

This in in BAAN IV c3.

Incidentally, if you are talking about the program script related to the session tfacp1110s000 "Maintain Purchase Invoices", in our system the program script is only 6,249 lines (in the standard BAAN VRC). The rest of the source code is in include files. So, I am not sure how you get such a large line number in your error message. (After customizations, our script is now 7238 line and compiles o.k. without error.)

[I do not have it any more, but in my previous company, there used to be a utility (in older BAAN versions) called explode.prog6.1 that would take the script as input and output a source file with all the includes 'pulled' in, and then one could look at the entire source code and investigate.]

toolswizard
5th November 2008, 21:36
I am not sure that there is a limit on the number of lines, but on the generated object size of 32k.