Skip to Content
Programming Languages: Concepts and Implementation
book

Programming Languages: Concepts and Implementation

by Saverio Perugini
December 2021
Beginner
840 pages
47h 29m
English
Jones & Bartlett Learning
Content preview from Programming Languages: Concepts and Implementation

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.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Concepts and Semantics of Programming Languages 1

Concepts and Semantics of Programming Languages 1

Therese Hardin, Mathieu Jaume, Francois Pessaux, Veronique Viguie Donzeau-Gouge
Programming C# 10

Programming C# 10

Ian Griffiths

Publisher Resources

ISBN: 9781284222739