Skip to main content

User-Defined Functions

  • Chapter
  • 187k Accesses

Abstract

Workflows often have sequences of common steps repeated within or across scripts. Functions allow programmers to group related steps of code, name them, and reuse them by calling them by name. This chapter discusses defining functions with required and optional parameters, returning values from functions, organizing code with functions, and managing variables inside and outside of functions.

Keywords

  • Input File
  • Function Call
  • Code Statement
  • Return Statement
  • Function Definition

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-319-18398-5_15
  • Chapter length: 29 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   79.99
Price excludes VAT (USA)
  • ISBN: 978-3-319-18398-5
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   99.99
Price excludes VAT (USA)
Hardcover Book
USD   139.99
Price excludes VAT (USA)
Figure 15.1
Figure 15.2

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and Permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Tateosian, L. (2015). User-Defined Functions. In: Python For ArcGIS. Springer, Cham. https://doi.org/10.1007/978-3-319-18398-5_15

Download citation