Parameters - Global Variables

From TRCCompSci - AQA Computer Science
Revision as of 23:29, 15 December 2016 by QuantumFluctuator (talk | contribs) (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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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