|
"Wilt, Charles" wrote: > > Doesn't seem to me like it is a good idea to use the same indicator in both > places. Is this a generally accepted practice? Does it really work? Is the > indicator set on if there's an error OR if you hit EOF? > Yes, the indicator is set on for either case. The way result indicators work is this: they are set to '0' when the operation begins, and then they're set to '1' during the operation if something happens. So for the READC, 97 would be set to '0' before the READC started, and then be set to '1' if either an error or EOF happened. Aside from the fact that using indicators is considered outmoded, I think it's better to use two indicators right from the start in case you later decide you want to use two indicators. Changing code to use a new indicator involves a fair amount of checking to see if using it will affect anything else in the program. (Which is one of the reasons I prefer using %EOF and %ERROR to indicators.)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.