Higher – Computational Constructs (revision)

  • Parameter passing: used to pass data from one subprogram to another; can either be passed by value (data will not change) or by reference (changes to the data will be made)
  • Variable scope: where a variable can be used in a program; local (only inside the subprogram in which the variable has been created) or global (can be used in any subprogram)
  • Subprograms: named blocks of code which can be run from within another part of the program; often used to break a large program into smaller steps
    • Functions: a type of subprogram used to return a single value eg round, random
    • Procedures: a type of subprogram that will follow a set of given instructions
    • Methods: a function in an object-oriented language that is defined inside a class

Thank you to C O’Toole & A Madill from Braidhurst High School for allowing me to publish this here.

Leave a Reply

Your email address will not be published. Required fields are marked *