To manipulate numbers, computers can perform a variety of mathematical operations, which is just a fancy way of saying a computer can add, subtract, multiply, and divide. To manipulate text, computers can perform a variety of string manipulation operations, which can chop out a letter of a word or rearrange the letters that make up a word.

 

Every programming language provides built-in commands operators for manipulating numbers and strings, but some programming languages are better at manipulating numbers or strings than others. These parameters let you change the way a subprogram works. So rather than write one subprogram to print the name John Smith 5 times and a second subprogram to print the name Mary Jones 16 times, you could write a single subprogram that accepts 2 parameters.

 

To give or pass parameters to a subprogram, you need to call the subprogram by name along with the parameters you want to give that subprogram. The first command tells the PrintMyName subprogram to use the number 5 and the string John Smith as its parameters. Because the number defines how many times to print and the string defines what to print, this first command tells the subprogram to print John Smith five times.

𐌢