# SLR1 Programming basics Flashcards

Data type

“Provided by a programming language as building blocks. E.g. char, integer, float, Boolean.”

Integer

“A data type used to store positive and negative whole numbers.”

Real/float

“A data type used to store an approximation of a real number in a way that can support a trade-off between range and precision. A number is, in general, represented approximately to a fixed number of significant digits and scaled using an exponent.”

Boolean

“Used to store the logical conditions TRUE/FALSE. Often translated to On/Off, Yes/No, etc.”

Character

“A single alphanumeric character or symbol.”

String

“A sequence of alphanumeric characters and or symbols – e.g., a word or sentence.”

Date/time

“A special data time used to store real dates. Behind the scenes, the date and time are actually represented by a single whole integer number which is the number of seconds since January 1st 1970 00:00:00. Also known as the computing epoch.”

Pointer/reference

“An object whose value refers or points to another value store elsewhere in the computer memory using its memory address.”

Record

“A data structure which consists of a collection of elements, typically in fixed number and sequence and typically indexed by names. The elements of records may also be called fields.”

Array/List

“A set of data items of the same type grouped using a single identifier. Each of the data items is addressed by the variable name and a subscript.”

User-defined data type

“A user-defined data type (UDT) is a data type that derived from an existing data type. You can use UDTs to extend the built-in types already available and create your own customised data types.”

Assignment

“An assignment statement sets or resets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable. In most imperative programming languages, the assignment statement (or expression) is a fundamental construct.”

Subroutine

“A set of instructions designed to perform a frequently used operation within a program.”

Sequence

“One of the three basic programming constructs. Instructions happen one after the other in sequence.”

Selection

“One of the three basic programming constructs. Instructions which can evaluate a Boolean expression and then branch the code to one or more alternatives paths is branching/selection.”

Iteration

“One of the three basic programming constructs. A selection of code which can be repeated either a set number of times (count-controlled) or a variable number of times based on the evaluation of a Boolean expression (condition-controlled) is iteration.”

Count-controlled loop

“An iteration which loops a fixed number of times.”

Condition-controlled loop

“A way for computer programs to repeat one or more various steps depending on conditions set either by the programmer initially or real-time by the actual program.”

Integer division

“Division in which the fractional part (remainder) is discarded.”

==

“Equal to: A mathematical comparison operator which means ‘the same as’, often referred to as ‘equality.’”

!=

“Not equal to: A mathematical comparison operator which means ‘not equal to’ – sometimes <> is used instead.”

<

“Less than: A mathematical comparison operator which means ‘less than.’”

>

“Greater than: A mathematical comparison operator which means ‘greater than.’”

<=

“Less than or equal to: A mathematical comparison operator which means ‘less than or equal to.’”

> =

“Greater than or equal to: A mathematical comparison operator which means ‘greater than or equal to.’”

NOT

“A logical operator used within a program. NOT works by returning FALSE if the input is TRUE, and returning TRUE if the input is FALSE.”

AND

“A logical operator used within a program. AND works by only returning TRUE if both values being compared are TRUE.”

OR

“A logical operator used within a program. OR works by returning TRUE as long as either value being compared is TRUE.”