GoConqr has a new look! Let us know what you think.

Flashcards

Functions, Procedures and their structuring

Matthew Robinson9329 English 6 cards

Cards in this deck (6)

  1. 1ParametersA group of
    data types, defined with a function/procedure, that must be given values when calling the function/procedure.
    MyFunction(int a, string b)
    Here, "a" and "b" are the parameters.
  2. 2ArgumentsWhen calling a function/procedure that has parameters, arguments must be given. These are the pieces of data that fulfill the parameters.
    MyFunction(4, "Hello World")
    Here, "4" and "Hello World" are the arguments.
  3. 3Passing an argument by referenceRegularly, MyFunction(x) would copy the value of x in to a local variable within the function, so whenever anything is done to this value the original remains the same.
    Passing by reference, MyFunction(ref x), would instead pass the address in memory to the function. This means that x is essentially now being used as a global variable, where if anything is changed within the function the original value will be changed too.
  4. 4ModularisationWhere one task is split up into many different, smaller tasks that are then connected together. This can be splitting a procedural program into separate subroutines or one application into several different scripts all together.
  5. 5Advantages to ModularisationEasier to debug.
    Multiple people can work on the same task.
    Specialists can work on the most specific tasks.
    Code can be re-used easily, possibly by using libraries.
    Far less overwhelming when only one task at a time needs doing.
    Different languages perform different tasks better, and multiple languages can be used.
  6. 6Disadvantages to ModularisationCan be tricky to connect it all together at the end due to the different languages/ways people write code.
    It takes longer to develop.
    Documentation of modules must be thorough.
    Difficulties may come from variable names being named by different people, different login

Information

Description
Flashcards on Functions, Procedures and their structuring, created by Matthew Robinson9329 on 03/05/2016.
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?