[comp.lang.pascal] Problems with Pascal Program

smash@oucsace.cs.OHIOU.EDU (Scott Mash) (03/07/91)

I am writing a program in Turbo Pascal and I have ran into a roadblock.

The program is very large and passes a great amount of variables.  A 
little ways into the program it starts call procedures that are not
accessed in that part of the program and starts printing control   
characters to the screen.  It just goes nuts.  I had to make the user
stack larger because of the number of variables it uses.

Any ideas? I have traced through my code a number of times and have
found nothing.

Help!!!

Thanks in advance,

Scott mash

-- 
|  Scott (Smasher) Mash                  |                                  |
|                                        |   Elvis lives !                  |
|  Internet: smash@oucsace.cs.ohiou.edu  |   Buddy Holly is the dead guy !  |
|  Bitnet: cs819@ouaccvmb                |                                  |

tlglenn@cs.arizona.edu) (03/07/91)

     Are pointers used in this large program with many variables?
Improper use of pointers can be fatal.

-- 
        -Ted L. Glenn             "Don't worry, be happy!" <--Ack! Pffffhhht!
         tlglenn@cs.arizona.edu
         G19382105@ccit.arizona.edu    G19382105@ARIZRVAX.BITNET

bob@sactoh0.sac.ca.us (Bob F. Breedlove) (03/09/91)

In article <3054@oucsace.cs.OHIOU.EDU>, smash@oucsace.cs.OHIOU.EDU (Scott Mash) writes:
> I am writing a program in Turbo Pascal and I have ran into a roadblock.
> 
> The program is very large and passes a great amount of variables.  A 
> little ways into the program it starts call procedures that are not
> accessed in that part of the program and starts printing control   
> characters to the screen.  It just goes nuts.  I had to make the user
> stack larger because of the number of variables it uses.
> 
Without being able to see the program itself, it is difficult to
debug it, but have you thought of recursion problems?  That is a
procedure or function which is calling itself and building huge
amounts of data on the stack?
-- 
Bob Breedlove  SYSOP: BOBsBBS (916/929-7511)
Author: CONFIG.EXE, RUN.EXE, CleanUp.EXE
        BATch EXecutive
        bob@sactoh0.SAC.CA.US

ebergman@isis.cs.du.edu (Eric Bergman-Terrell) (03/10/91)

My suggestion:  turn on every debugging option ($R+, etc).  Generate debugging
information.  Then when your program "goes nuts", you may get lucky and be
able to determine the line where it's crashing & why.

All of this is described (quite well, in fact) in the manuals.

Terrell