Skip to main content

Comparing Data

  • Chapter
  • First Online:
Swift 5 for Absolute Beginners

Abstract

In this chapter, we will discuss one of the most basic and frequent operations you will perform as you program: comparing data. In the bookstore example, you may need to compare book titles if your clients are looking for a specific book. You may also need to compare authors if your clients are interested in purchasing books by a specific author. Comparing data is a common task performed by developers. Many of the loops you learned about in Chapter 8 will require you to compare data so that you know when your code should stop looping.

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 44.99
Price excludes VAT (USA)
  • Compact, lightweight 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

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Stefan Kaczmarek, Brad Lees, Gary Bennett

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Kaczmarek, S., Lees, B., Bennett, G. (2019). Comparing Data. In: Swift 5 for Absolute Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4868-3_9

Download citation

Publish with us

Policies and ethics