Re: Whenever Error
Posted in 1993
Thank-you to those of you who answered my question about the scope of whenever error statements. The unfortunate thing about whenever statements, it turns out that they are even more limited than within the scope of a module (I should have been more specific that we were experiencing this problem within modules.) Anytime you even make a function call to an outside module, the whenever error gets reset and needs to be reset. And good programmers like to reduce duplicate code and write general purpose functions which can be called from anywhere... I could get used to one whenever statement at the beginning of eachfunction (I guess), but after every function call seems a bit ridiculous. Perhaps I am still missing something... but I do not wish to litter my code with whenever statements. One person commented that he would be embarrassed to admit that his code needed whenever error continue statements. Whenever error continue statements, when used with good error handling routines are a good way to save wear and tear on both programmers & users - especially when users need the ability to do an interrupt during any select statement in the program. If I'm way off base, please tell me so. But this whenever implementation seems pretty flakey to me. Thanks for your time! Cathy +-------------------------------+----------------------------------------+ | Cathy Kipp | Internet: ckipp@vth1.vth.colostate.edu | | Veterinary Teaching Hospital | | | Colorado State University | Voice: (303) 491-1294 | | Fort Collins, CO 80523 | Fax: (303) 491-1205 | +-------------------------------+----------------------------------------+