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

7.7 Function Overriding

Function overriding (also called function hiding) occurs when multiple function definitions share the same function name, but only one of those function definitions is visible at any point in the program due to the presence of scope holes. For instance:

A set of seven code lines demonstrating function overriding.
Description
Continuation of the code demonstrating function overriding, consisting of three lines.
Description

Here, the call to function f on line 10 binds to the outermost definition of f (starting on line 3) because the innermost definition of f (line 5) is not visible on line 10—it is defined in a nested block. The call to function f on line 7 ...

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