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

13.4 Other Mechanisms for Global Transfer of Control

In this section we discuss the conceptual differences between first-class continuations and imperative mechanisms for nonlocal transfer of control. This comparison provides more insight into the power of first-class continuations.

13.4.1 The goto Statement

The goto statement in most languages supporting primarily imperative programming is reserved for nonlocal transfer of control:

A set of 17 code lines with the state go to.
Description

This simple example illustrates the use of a label again: (line 6) and a goto (line 8) to create a repeated transfer of control resulting in an infinite loop.

Programmers are generally advised to avoid ...

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