Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!spool.mu.edu!munnari.oz.au!uhccux!uhunix1.uhcc.Hawaii.Edu!wyuu From: wyuu@uhunix1.uhcc.Hawaii.Edu Newsgroups: comp.lang.pascal Subject: For statement bug? Message-ID: <13134@uhccux.uhcc.Hawaii.Edu> Date: 21 May 91 11:22:00 GMT Sender: news@uhccux.uhcc.Hawaii.Edu Organization: University of Hawaii Lines: 25 Hello. Im running into a problem I cant seem to explain. for some reason, when I put a variable (integer) as an argument in a for loop. It crashes my system. I am still using turbo pascal 5.0 example: procedure makescreen; var level :integer; i : integer; begin level := 1; level := level + 4; for i := 1 to level do {this is the line that wonks my program..} begin { code.. code.. code..} end; end; and if I call this procedure.. WHAMMO! I am creating a video game and when it comes to this procedure, all these random pixels fills up my screen and locks up my system.. I have to cold start my system to get it back running.. but if I put a integer.. ie.. 4 or sumthin in the for i statement.. everything is hunky dory.. am I missing something here? any comments help.. is appreciated. thanks.