Prev: what happened CBM=VGA
Next: 1581 Drive Kits on eBay
From: mdj on 29 May 2006 04:07 Paul Schlyter wrote: > It's easy to exceed the bounds of an array by accident and overwrite other > data structures in the program with garbage. Apparently it's no more difficult > in Ada than in FORTRAN or C ...... Ada provides bounds checking on array indices, and in addition provides an "in" construct which can be used to iterate over an array without specifying the number of iterations in the loop construct as you typically would in C To fall over the edge of an array in Ada, you'd need to do this quite deliberately. It would require determining the address of either the first or last element, and deliberately modifying the pointer to overstep the array bounds. In short, this never happens "by accident" in Ada, it must happen by design. This pretty much means that in practice, it never happens. Matt
From: Paul Schlyter on 29 May 2006 06:12 In article <1148890072.982487.177830(a)j33g2000cwa.googlegroups.com>, mdj <mdj.mdj(a)gmail.com> wrote: >Paul Schlyter wrote: > >> It's easy to exceed the bounds of an array by accident and overwrite other >> data structures in the program with garbage. Apparently it's no more difficult >> in Ada than in FORTRAN or C ...... > >Ada provides bounds checking on array indices, and in addition provides >an "in" construct which can be used to iterate over an array without >specifying the number of iterations in the loop construct as you >typically would in C > >To fall over the edge of an array in Ada, you'd need to do this quite >deliberately. It would require determining the address of either the >first or last element, and deliberately modifying the pointer to >overstep the array bounds. > >In short, this never happens "by accident" in Ada, it must happen by >design. This pretty much means that in practice, it never happens. > >Matt So this bounds checking can not be turned off in Ada, for efficiency ? -- ---------------------------------------------------------------- Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN e-mail: pausch at stockholm dot bostream dot se WWW: http://stjarnhimlen.se/
From: mdj on 29 May 2006 21:18 Paul Schlyter wrote: > So this bounds checking can not be turned off in Ada, for efficiency ? It's compiler dependent - but the Ada compilers I've used allow pretty much all runtime checking to be disabled. This is reasonable - after a degree of testing I guess... I've personally never written anything in Ada that ran slowly enough to bother with it. Matt
From: Michael J. Mahon on 30 May 2006 18:52 mdj wrote: > Paul Schlyter wrote: > > >>So this bounds checking can not be turned off in Ada, for efficiency ? > > > It's compiler dependent - but the Ada compilers I've used allow pretty > much all runtime checking to be disabled. This is reasonable - after a > degree of testing I guess... I've personally never written anything in > Ada that ran slowly enough to bother with it. Turning off error/assertion checking after development and test and before distributing software for use is like wearing life vests during training, but taking them off before going to sea (to paraphrase Dijkstra). -michael Parallel computing for 8-bit Apple II's! Home page: http://members.aol.com/MJMahon/ "The wastebasket is our most important design tool--and it is seriously underused."
From: Michael J. Mahon on 30 May 2006 20:27
Cameron Kaiser wrote: > pausch(a)saaf.se (Paul Schlyter) writes: > > >>Parallell Apple II's - interesting - but don't you thin one would >>get more performance from a modern computer than from a few Apple II's >>working in parallell? :-) > > > As they say, it's not that the dog walked well, but that the dog ... > ;) > > Besides, it's a clever idea. :) Thanks, Cameron. And it is *really* a parallel system, meaning that almost any issue that can come up on any other parallel system also manifests itself with an AppleCrate or NadaNet setup. Synchronization, queuing, race conditions--it's all there for experimentation! -michael Parallel computing for 8-bit Apple II's! Home page: http://members.aol.com/MJMahon/ "The wastebasket is our most important design tool--and it is seriously underused." |