Mark Chimley on Mon, 22 Jan 2001 07:52:17 +0000 (GMT) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re. Strangely modified variables |
Many thanks, Gerhard, for pointing me in the right direction. The problem turned out to be a stack fault as you suspected. Interestingly, it was caused by GEN P not being initialised. Obviously, the GENs must be defined before the stack is initialised, so the pointers begin life pointing to some miscellaneous part of memory. My first assignment to P was with stoi (l), where l is a long, initialised to 0. For some reason, P = stoi (0) doesn't return a value within the PARI stack, so P continues to point into space! Simply initialising l with 1 instead, solved the problem. Mark. -------------------------- Mark Chimley, Department Of Mathematics, University Of Bristol --------------------------