What Is a Procedure?

A procedure is a set of instructions that is grouped together, given a name, and made available for later use. This makes your code easier to read, think about, and change. Ultimately, using a procedure is more powerful. The steps for getting started are fairly straightforward.

Adding a procedure is accomplished through a simple command in the Blocks Editor (see Figure 5.1).

Image

Figure 5.1 Adding a procedure in the Blocks Editor.

Procedures dramatically improve the process of building multistep features into your app. Often an app needs to perform the same action several times or in different circumstances. Creating a procedure ...

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.