gnu.de
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
thread

bug

Toby Ewing

1 May 2000 1 May '00
9:13 p.m.

Hi, all. I've been fighting a bug for a while, and when I stripped it down to its basics, I was surprised. My test program is appended. The issue involves arrays of size > 255. When I use Ymax = Zmax = 250, the program runs fine. When I use Ymax = Zmax = 260, the portion of the program that runs in Main works fine, but the procedure stops at y = 7, z = 260 - the program hangs, with ^C ineffective. I'm running a pentium 400 under Win98. I've had no trouble with this in small arrays, but 256 seems to be a divide of some sort. Any suggestions appreciated. Toby Toby Ewing Soil Scientist, Iowa State University ------------------------------------------------------------------- Program TestLgArray; Const Xmax = 25 ; {physical space - grid units} Ymax = 260; {physical space - grid units} Zmax = 260; Type Compary = array[1..Ymax, 1..Zmax] of integer; var Comp : Compary; x, y, z : integer; {________________________________________________ } Procedure Zero; var Comp : Compary; x, y, z : integer; begin writeln('Procedure:'); readln; for y := 1 to Ymax do begin {zero the comp array} for z := 1 to Zmax do Comp[y,z] := 0; writeln('y=', y:3, ' z=', z:1); end; end; {________________________________________________ } begin {Main Program} writeln('Main:'); readln; for y := 1 to Ymax do begin {zero the comp array} for z := 1 to Zmax do Comp[y,z] := 0; writeln('y=', y:3, ' z=', z:1); end; Zero; write(' done'); end.

0 0
Reply
Sign in to reply online Use email software

Back to the thread

Back to the list

HyperKitty Powered by HyperKitty version 1.3.12.