Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cica!iuvax!uxc.cso.uiuc.edu!tank!ncar!asuvax!hrc!gtephx!bakerj From: bakerj@gtephx.UUCP (Jon Baker) Newsgroups: comp.sys.amiga Subject: Re: Pascal for Amiga Summary: Pascal - Pete Hoare Keywords: pascal wanted Message-ID: <44d06bd6.14249@gtephx.UUCP> Date: 3 Aug 89 20:51:46 GMT References: <1201@syma.sussex.ac.uk> Organization: AG Communication Systems, Phoenix, Arizona Lines: 28 In article <1201@syma.sussex.ac.uk>, aledm@syma.sussex.ac.uk (Aled Morris) writes: > > I am using the MCC pascal compiler v1.25 and am having some severe problems > with it. It appears that after a certain number of recursive calls some > variables become corrupt. On returning from the recursion the values are > correct again, suggesting to me that the memory allocation is causing the > problem. I've increased the stack size and I'm using a RAM expansion box > giving me 2.5 Mbyte so I don't beleive that there is a memory shortage. > Any ideas ??? > > Failing this is version 2 of the compiler any better ? Failing that does > anyone know of any other Pascal compiler around ? > Pete, I have the Modula-2 compiler, which may be what you are referring to. I have had problems passing variable length string variables as parameters. The string gets corrupted somewhere on the stack, with funny characters appended to the end. Changing allocated stack size changes the appended funny character. I was not doing recursive calls. I worked around the problem by declaring the variable-length character string vars as global to both caller and called, rather than declaring locally and passing as parameter. Don't know if this will help your recursion problem, though. J.Baker. asuvax!gtephx!bakerj