Chapter 11 Manipulating Numbers

11.1 Introduction

Just like every high-level programming language, Visual Basic provides many ready-to-use subprograms (called functions, subprocedures, or methods) that you can use whenever and wherever you wish.

A “subprogram” is simply a group of statements packaged as a single unit. Each subprogram has a descriptive name and performs a specific task.

To better understand Visual Basic's subprograms, let's take Heron's[11] iterative formula that calculates the square root of a positive number.

Image

where

y is the ...

Get Visual Basic and Algorithmic Thinking for the Complete Beginner 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.