3.2.5 Computing - Writing Maintainable Programs

HideShow resource information
Define: Variable
Variable: Named location in memory, given a data type and initial value. Can change during run time.
1 of 12
Define: Constant
Constant: Like a variable, but the value cannot change.
2 of 12
What is an 'Identifier'?
An identifier is the name given to variables, constants and sub-procedures.
3 of 12
What is a 'Reserved Keyword'?
A Reserved Keyword is a word reserved for use by the programming language (e.g. int and while).
4 of 12
What is the need for good program writing techniques?
So another person can upgrade, maintain or repair the code more efficiently and easily.
5 of 12
What is a 'Scope'?
A scope refers to the visibility of a variable. It refers to whether the variable is a global or local variable.
6 of 12
What is a Global Variable?
A global variable is a variable which can be used in any part of your program.
7 of 12
What is a Local Variable?
A local variable is a variable which can only be used in a function.
8 of 12
Why should you initialise variables appropriately before using them?
This is so the previous values of the variable cannot affect the operation of the program.
9 of 12
Why should you annotate the code with comments?
This is so the logic of the code can be followed by other people.
10 of 12
What are the two types of comments?
Single line and Multi-line comments.
11 of 12
Why should you use indentation?
Indents show code-blocks nested within selection and iteration statements.
12 of 12

Other cards in this set

Card 2

Front

Define: Constant

Back

Constant: Like a variable, but the value cannot change.

Card 3

Front

What is an 'Identifier'?

Back

Preview of the front of card 3

Card 4

Front

What is a 'Reserved Keyword'?

Back

Preview of the front of card 4

Card 5

Front

What is the need for good program writing techniques?

Back

Preview of the front of card 5
View more cards

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Program techniques resources »