Lecture 4 Notes

6 38 5 1 4 the clause is like a it

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: es the expression . We adopt the convention that we separate module definitions from the program body by a blank line, but that is not required by our grammar. ¥ ¡ 6&£ ¨38¡  5 §  § £ ¡% ¨ ¢ ¢1 © £ ¤¡ § 4 The clause is like a . It causes the value of the module to be computed. If there were effects in the definition of , this is when they would occur. ¥ ¥ ¡ &£ 38¡ 1 5  The expression is called a qualified variable reference. In conventional languages it might be written or or . ¥" " A1@ ¥ ¥" B@ ¥9 A@ In the program body, is bound to a module value that associates the name with the expressed value 3. The qualified variable reference denotes the binding of the name in module . Hence its type is and its value is 33. ¥ ¡ 6&£ 5 £ © 0 8¡   4 ¥ Example 2. The interface establishes an abstraction barrier between the module and the program body. We sometimes say that the expressions in the implementation are inside the abstraction barrier, and everything else is outside the abstraction barrier. A module body may supply bindings for names that are not in the interface, but those bindings are not visible in the program body. ' )) 0' $  ¡ © £¤&£  ¡ ¡ $1£...
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