Let me make this more precise: Suppose you want to ask, "do you have more data". Many properties of state simply don't exist concurrently. ![]() As with all things concurrent, questions about the "current state" don't make sense: There is no concept of "simultaneity" across concurrent events. The environment truly exists "concurrently" with your program. The environment is not part of your program, and not under your control. I/O operations interact with the environment. So continue reading if you're interested in what while(!feof) actually does. I'd like to provide an abstract, high-level perspective. ![]() ![]() The result is that you are erroneously executing code that assumes that it is accessing data that was read successfully, when in fact this never happened. While(!feof) is wrong because it tests for something that is irrelevant and fails to test for something that you need to know.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |