Subroutines Flashcards

1
Q

Features of IDE

A

Auto-completion, Can view identifiers/avoid spelling mistakes
Syntax Highlighting, Can identify features quickly/use to check code is correct
Stepping, Run one line at a time and check result
Breakpoints, Stop the code at a set point to check value of variable
Watch Window, Check values of variables and how they change during the execution
Error Diagnostics, Locate and report errors/give detail on errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Two types of subroutines

A

Function - A self-contained section of a program that is designed to return a value
Procedure - Self-contained section of a program that is a defined set of instructions designed to perform a task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Difference between Functions and Procedure?

A

A function is used to calculate something from a given input whilst procedure is the set of commands which are executed in order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a parameter?

A

Name of the information we want in a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Difference between passing a parameter by value and reference

A

By value, is only a copy of the variable that is passed to the subroutine whereas by reference, the address of the variables passed to the subroutine.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an IDE?

A

Integrated Development Environment is often used to write a computer programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly