B.3 Primitive Types

ML has the following primitive types: integer (int), real (real), boolean (bool), character (char), and string (string):

A set of 10 code lines in M L with five primitive types: Integer, real, Boolean, character, and string.
Description

Notice that ML uses type inference. The : colon symbol associates a value with a type and is read as “is of type.” For instance, the expression 3 : int indicates that 3 is of type int. This explains the responses of the interpreter on lines 2, 4, 6, 8, and 10 when an expression is entered on the preceding line.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.37.12