aledm@syma.sussex.ac.uk (Aled Morris) (08/01/89)
[I'm posting this for a friend without news access, all replies by mail only to the address below, please --aled] 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 ? Hardware is A1000 + 2.5MByte expansion + 1.2 Workbench Pete Hoare Royal Holloway and Bedford New College | mail: uhac011@vaxa.rhbnc.ac.uk Computer Science Department | uucp: ...!ukc!rhbnca!uhac011 Egham, Surrey TW20 0EX, England | talk: +44 784 434455 x3425 #include <std/disclaimer.h>
451061@UOTTAWA.BITNET (Valentin Pepelea) (08/03/89)
aledm@syma.sussex.ac.uk write in Message-ID: <1201@syma.sussex.ac.uk> > 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 ??? Nope, sorry. :-) > Failing this is version 2 of the compiler any better ? Failing that does > anyone know of any other Pascal compiler around ? Yeah, a recent PD version has been plunged in the FishTank. Looks pretty nice, includes includes, and few more tongue twisters. But version 2.0 of the MetaComPost compiler is supposed to be rather bug free, and stuffed with a few more features. It does not include includes through. Call the company for more info, it is located on the same tiny island after all. :-) But how about switching to Modula-2? > Hardware is A1000 + 2.5MByte expansion + 1.2 Workbench Neat. Try out a Lucas board though. > Pete Hoare Valentin _________________________________________________________________________ The godess of democracy? "The Name: Valentin Pepelea tyrants may destroy a statue, Phonet: (613) 231-7476 but they cannot kill a god." Bitnet: 451061@Uottawa.bitnet Usenet: Use cunyvm.cuny.edu gate - Confucius Planet: 451061@acadvm1.UOttawa.CA
bakerj@gtephx.UUCP (Jon Baker) (08/04/89)
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