Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-athena.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!mit-athena!jc From: jc@mit-athena.UUCP (John Chambers) Newsgroups: net.lang.c Subject: Re: event-handling approach to errors Message-ID: <105@mit-athena.UUCP> Date: Tue, 5-Mar-85 10:21:21 EST Article-I.D.: mit-athe.105 Posted: Tue Mar 5 10:21:21 1985 Date-Received: Thu, 7-Mar-85 05:21:08 EST References: <7028@watdaisy.UUCP> Organization: MIT Project Athena Lines: 19 > ... How do > you provide a correction action for something like a subscript violation? Hey, MasterCard knows how to handle this. On several occasions, I've overflowed (overflown?) my credit limit, and they responded promptly by upping the limit! It takes care of the problem quite nicely. Seriously, in a language that allows dynamic allocation of space (as do C, APL, and many other languages), it is not unreasonable to consider such a solution. I've had several applications where it was a real pain to initially allocate things to their largest possible size. If an array will usually only hold 2 or 3 items, but may grow to 50000 in some cases, you don't want to allocate 50000 in all cases. If you have several such arrays, what do you do? It would be really nice if you could intercept the out-of-bounds reference, determine that it was for one of the select list of "growable" arrays, and re-allocate the one involved to have more space. John Chambers