event-handling approach to errors
mwm at ucbtopaz.CC.Berkeley.ARPA
mwm at ucbtopaz.CC.Berkeley.ARPA
Fri Mar 8 13:24:14 AEST 1985
> ... How do
> you provide a correction action for something like a subscript violation?
Complain if the user doesn't catch it. The user then gets to use it for walking
dynamic arrays, to wit:
i := 0
while true do
<mangle array element array[i]>
end except when bounds: end
After seeing that a few times, it reads as naturally as:
for (i = 0; i < bounds; i++)
<mange array element array[i]> ;
<mike
More information about the Comp.lang.c
mailing list