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.
Identifiers should not contain spaces and should always start with a letter. In this example, high score could be identified as:
Arrays can be identified by the inclusion of square brackets. An array of high scores could be identified as:
Array indexing will start from 0 unless otherwise stated.
The following tables contain basic elements of Reference Language that can be grouped together easily.
|Exponent (to the power of)|
|Inequality/Does not equal|
|Less than or equal to|
|Greater than or equal to|
|Both Required (conjunction)|
|One or the other required (disjunction)|
|Join strings or substrings/Concatenation|
|Determine string length/number of characters|