GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Subroutines, Global Variables and Parametres

Saji McCorkindale CFE Higher Computing Higher Englisch

Subroutines, Global Variables and Parametres

Inhalt der Mindmap

Subroutines, Global Variables and Parametres

  1. Parametres

    • A parameter is a value that is being passed in or out of a block of code. Parametres can be passed into a program in two ways
      • By Value
        • Used when a value needs to be passed into a program but does not need to be passed out again
        • The fromal and actual parametres have diffrent memory locations when a parametre is passed by value. (A new memory location is made for the formal parametre
      • By Refrence
        • Used when a value will be passed into a program, updated and then passed out again
        • Arrays are always passed by refrence
        • The formal and actual parametres share the same memory location when the parameter is passed by refrence
  2. Subroutines

    • It is often more efficient to split up a program into modules called subroutines. These can then be used in any order, and more than once if need be.
      • This makes the code more efficient, and saves time in both writing and correcting the code. The below image shows an example of were time is saved by re-using subroutine "validate"

Bilder und Dateien der Mindmap

  • Subroutines, Global Variables and Parametres

Informationen

Beschreibung
Higher CFE Higher Computing Mindmap am Subroutines, Global Variables and Parametres, erstellt von Saji McCorkindale am 29/04/2015.
Erstellt von
Saji McCorkindale
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck