Skip to main content

Abstract

In this chapter the second ingredient of a program namely “actions” that programmers use to manipulate data for solving real-world problems are introduced. Actions are transformed into machine instructions, which are then decoded and executed by the CPU. After a brief discussion on the purpose and the scope of actions, different action types are introduced. An important part of Chap. 3 is devoted to expressions and their evaluation: regarding this, Church–Rosser property, side-effects and Dikstra’s “Shunting Yard Algorithm”, which is the most common expression evaluation method, are presented. The chapter also talks about the different operators that a programmer can use in expressions, the actions that can be used for controlling the flow of the program (i.e., conditionals) and the actions that can be reused again (i.e., functions). Like other chapters, the discussions and the presentations are supported by the case studies and examples in Python.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.95
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 44.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    A global variable is a variable that is accessible by all functions.

  2. 2.

    “Entscheidungsproblem” means “decision problem” in German.

  3. 3.

    Archaically, not value returning functions were named as subroutines or procedures.

  4. 4.

    Excluding stochastic functions.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Wien

About this chapter

Cite this chapter

Üçoluk, G., Kalkan, S. (2012). Actions: The Second Ingredient of a Program. In: Introduction to Programming Concepts with Case Studies in Python. Springer, Vienna. https://doi.org/10.1007/978-3-7091-1343-1_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-7091-1343-1_3

  • Publisher Name: Springer, Vienna

  • Print ISBN: 978-3-7091-1342-4

  • Online ISBN: 978-3-7091-1343-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics