Power #05
27 октября 1996 |
|
Thoughts on - programmer tale from Uncle Kolya.
Thoughts on ... Programmer tale of Uncle Kolya Returning from a summer school for young programmers, Sasha drove a couple of days to my grandmother in the city where he had been. On the day sleduyushy grandmother asked him to go to the bakery, where sold the best (in her opinion), bread, and buy her favorite rolls, as well as the city's grandson did not know gave him a "program" Travel: From the entrance go to right about 200 meters, down the alley to trams and 3 tram N4, a little further away and the store is visible. "NO ERRORS" - Sasha said (which means "all understand ") and drove off. After 200 meters on the right was ... fence. "So, the division into zero "- turned the situation on the programming language Sasha. There was lane to the left and right lane was only yards to 100, but where to go? I had to go back. It turned out that my grandmother made a mistake in assessing the distance. When you try to execute an amended "Program" at first there was a situation "addressing" (tram N4 it did not go: it turned out that was needed N14), followed by "overflow" (through stop was the ultimate: Grandma forgot to say that need to go out and catch a tram, riding in the opposite direction), then there was "illegal conversion" (the shop was milk), and finally, when the "program" was "debugged" and Sasha was in the right store, then a glance at the shelves, he understood: "EOF" - Grandma's favorite rolls over. How to deal with errors? Need care and skill in time to ask yourself: "I am a I know, but how it knows the computer? " L. SHTERNERBERG SCIENCE AND EDUCATION 6.1987 Welded team (Mikrodrama in the system host) translation machine Actors: PP - Program User M - Monitor AP - Printer TK - Wire Channel T - Terminal B - Buffer Comes to interrupt user programs PP Hey, monitor! M. What? P.P Digit '6 'should be printed M. Hey, Printer! PS I'm busy. PP Then, monitor, give more memory M. No memory, write to the disk. Drive! Disc raises the flag alert. D. called for me? M. Record necessary. D. There! TK Monitor! For you to get bytes. M. Wait. The disc, recorded? D. There is no space. M. Wire feed! Come on its bytes. TK Already come sleduyushy, I erased the old. MA Program, you are sent a byte? PP None. Monitor puts bytes into the buffer. M. Terminal! User something to click? T. No. MA Program! Work on. PP I can not figure '6 'should be printed. M. printer! PS I'm busy. TK Monitor, for you to get bytes. M. Come on. Program, this is your bytes? PP None. M. Buffer! B. I am full. The monitor emits bytes. M. printer! P. Free. M. Print digit '6 '. P. Yes. M. A program running on. The program works, is one millisecond. PP Hey, monitor! Number '7 'should be printed. Newspaper "For Science" 10/10/1986 (MIPT) These articles I found in the journal SCIENCE AND Education, "which took in school (rodnenkoy, 51st) in the study computer science. There were even magazines that I take later, and look what is still good. I have news - I'm writing the second (of course, improved) version of my converter. If you about it yet know, then either look ZX-PLATINUM 2, or ask him a INVADER'a. The new version will (hopefully) fixes found bug and will add a new opportunity. I think that will add something else. (C) ANTON
Other articles:
Similar articles:
В этот день... 21 November