Lecture 4 Notes

Each declaration declares a program variable and its

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: $ § §§ ¥ ¥ ¡ 6£ ¨ 8¡  ¤¢ ' 5 § £ §4 % £  ¡ 1 © % £  ¡ © ¤&£  ¡ ¡  © $ £ © " !¡¤¡ £ ©   ¡ ¦¤¢ ¥£¡ ¡ ¢¢ $ '(¥  ¡ © ¤&£  ¡ ¡  © % £ $" £ © #¥ !¤¡ £ © ¡  § ¨ ¡ ¦¤¢ ¥£¡ Example 8. In our language, module names are global. However, the values exported by a module are computed only when that module is imported. In order to use a value from a module, that module must be explicitly imported. This is required even inside another module. Example 9. If a module tries to import itself, even indirectly, then an infinite loop will result. For example, $ £ © " § $ § ' % £  ¡ 1 © % £  ¡ © ¤&£  ¡ ¡  © !¤¡ £ © ¡  § ¨ ¡ ¦¤¢ ¥£¡ ¡ ¡ $§' §4 % £  ¡ 1 © % £  ¡ © ¤&£  ¡ ¡  © $ £ © " !¡¤¡ £ ©   ¡ ¦¤¢ ¥£¡ ¡ ¡ § £ ¡% ¨ ¢ ¢1 © ¢ ¤¢ § ¨ will cause an infinite loop, since the attempt to import will attempt t...
View Full Document

Ask a homework question - tutors are online