Difference between revisions of "Parameters - Global Variables"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Created page with "When a variable needs to be passed into a subroutine, this is done through the use of parameters. The subroutine can then use these parameters to execute its code. Parameters ...")
(No difference)

Revision as of 23:29, 15 December 2016

When a variable needs to be passed into a subroutine, this is done through the use of parameters. The subroutine can then use these parameters to execute its code. Parameters should be written inside the subroutine brackets, along with their variable type. In addition, multiple parameters should be separated by commas (",").

Example

File:Passing variables.png