Recent

Author Topic: Help with fpc 3.0.0  (Read 2006 times)

ranjani

  • Newbie
  • Posts: 1
Help with fpc 3.0.0
« on: January 28, 2016, 02:56:40 am »
We have a Pascal program using recursion feature. We are using free pascal IDE for win32 with version 1.0.12 2015/11/16 with  compiler version 3.0.0. We could generate executable using command line option E:\FreePascal\bin\i386-win32\fpc testpgm
 
On invoking the executable, run time error 202 - Stack overflow is generated. We tried to use the compiler directive for setting stack size as follows :
{$M 131072,0,2097152}
Still the error persisted. We tried another option :
{$MAXSTACKSIZE $FFFFFF} which was also unsuccessful. 
 
Using free pascal IDE for win32 version 0.9.2 2002/04/26 with  compiler version 1.0.6 and also with free pascal IDE version 1.0.6 2005/11/26 with compiler version 2.0.2, the above program testpgm was executing correctly without any run time errors.

When we used the IDE with compiler version 3.0.0 to generate the executable for some programs, we are getting run time error 201. On the other hand, if we generate the executables for the same programs by invoking the compiler from command line, there are no run time errors.

When we compared the results of running the executables generated from fpc version 1.0.6 with those of 3.0.0, there seems to be a difference in precision of numbers by one digit.
 
Kindly guide us on how to sort out the above three issues and proceed further using IDE version 1.0.12.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8139
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Help with fpc 3.0.0
« Reply #1 on: January 28, 2016, 11:15:24 am »
Start by showing some code. The chance is that isn't real stack size that's need to be modified, but an infinite recursion that triggers the stack overflow.