Arguments

An argument is a way to give information to a procedure when it is called. You already provided arguments to procedures when you used a block with an open socket(s), such as when you set the value in a textbox. The value you connect to the set block is an argument. Creating a procedure with an argument involves the mutator, which is the small blue box with a white gear. Clicking this blue icon enables you to drag additional smaller blocks onto the larger block.

With procedures, the little blocks in the mutator add arguments. Each argument is a named value of information that will be passed into the procedure whenever it is called. These values are inputs to the procedure. This changes the shape of the call block, adding sockets for ...

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.