Reference Language

Reference Language is used in National 5 Computing Science. This language differs from pseudocode in that there is a clear structure that must always be adhered to. It is essential to be able to read and understand Reference Language.

Reference Language is formal which means, while appearing very similar, it is not pseudocode. It provides everyone studying Computing Science with a standard that must be understood by all.

Basic elements

Identifiers

Identifiers should not contain spaces and should always start with a letter. In this example, high score could be identified as:

  • highscore
  • high_score
  • highScore

Arrays can be identified by the inclusion of square brackets. An array of high scores could be identified as:

  • highscore[ ]

Array indexing will start from 0 unless otherwise stated.

The following tables contain basic elements of Reference Language that can be grouped together easily.

Operations (Interger and Real data types)

OperationSymbol
Add+
Subtract-
Multiply*
Divide/
Minus-unary
Exponent (to the power of)^

Comparison Operators

OperationSymbol
Equality/Equals=
Inequality/Does not equal
Less than<
Less than or equal to
Greater than>
Greater than or equal to

Logical Operators

OperationSymbol
Both Required (conjunction)AND
One or the other required (disjunction)OR
Not (negation)NOT

String Handling

OperationSymbol
Join strings or substrings/Concatenation&
Determine string length/number of characterslength