Lecture 4 Notes

6 5

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: o import , which will attempt to import again. In this program, of course, the imports are completely unnecessary. § ¨ 10 § 11 §   ¡ ©  © £  ¡ £ © ¢ ¡ % £ ¡ ©  ¡ ¡ © £ © © ¡ £ ¢ ¡ 6¢ ¢  ¥£¡  § © ¤¡ ¢ ¢ ¤¢ £ ¡ ¥£¡ ¢ £  ¡ 1 © ¡   £ %¢  ¢ % £  ¡ © ¤&£  ¡ ¡ 1 © ¢ ¥£¤¡ ¢ ¤&&¡ £ 8© ¢ ¡  ¥£¡ ©  © £  ¡ £ © ¢ ¡ 6¢ ¢ £ ¥£  ¡ © £ © 8© ¡ £ ¢ ¡ ¤¡  £ A module definition consists of its name, its type, and its implementation, which consists of an arbitrary number of import statements and a module body. § §  ¡¡  % ¢   § ¦¦ ¤  ¡ © ¨§¡  % ¥¡  ¡ ©  © £  ¡ £ © ¢ ¢ ¢1 © £¡   £ £ ¡% ¢  § ¥£¡   ¡ © £ © © ¦¡ £ ¢ ¡ ¤¢ ¡   £ £   ¡¡  %  £ A program consists of a sequence of module definitions, followed by an expression. 7.3.1 Syntax 7.3 Implementing the Basic Module System A module type for a simple module consists of an arbitrary number of declarations. Each declaration declares a program variable and its type. We call these value declarations, since the variable being declared will denote a value. In later sections, we introduce more declarations and more module types. § ¢ $¢ § £ § ¡ % £ ¢ ¢ ¤¢ ¢  ¡ © ¡ ¥£¡ £    ¡ © ¤¦¢&¡ £ ¡   £ ¢ ¢ £ ¥£ ¡ % £ ¢ ¡ ¤¡ © £ §  ¡ © £¤¦¢&¡ £ ¢  ...
View Full Document

This document was uploaded on 03/17/2014 for the course CSG 111 at Northeastern.

Ask a homework question - tutors are online