Why Use Procedures?

Using procedures to name sequences of code gives you two advantages:

Image You can hide the work required to perform a task, which could be big and complicated, behind a single block that has a descriptive name.

Image You can reduce duplicate code, which makes your app easier to debug, update, and read. Having an excessive number of duplicated blocks can make debugging or changing an app needlessly difficult.

When creating a procedure, it is always a good idea to assign it a descriptive name. This adds meaning and makes it easier for you ...

Get Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.