program recursion1(input,output); { The procedure "WriteMessage" is recursive. That is, it calls itself. Answer these questions. 1. Is this sort of thing allowed? Does this program compile? 2. Don't run the program yet. First, what do you expect this program to do? 3. Run it. What happened? If there was an error message, write it down. 4. Write an iterative procedure (that is, a program using a loop instead of recursion) to do the same thing that WriteMessage does. Test your procedure. Does it show the same behavior as WriteMessage? How are they different? 5. Go back to WriteMessage. Modify the program to show you how many times WriteMessage gets called before the program fails. Now try it, and write down the number of calls before failure. Is this count the same every time you run the program? 6. Change the type of "theMessage" and "message" to string[5000]; How many times does WriteMessage get called before it fails? Try again with string[2500] and string[1000]. What's going on? } type stringType = string[10000]; var theMessage : stringType; procedure WriteMessage( message : stringType ); begin writeln( message ); WriteMessage( message ) end; begin write( 'What''s your message? ' ); readln( theMessage ); WriteMessage( theMessage ) end.