Programming Constructs and Techniques
Programming Constructs and Techniques
Command words
Commands words are orders used to tell what the computer need to perform.
Such as “save and close” the computer will do exactly what the command is.
Programmers are not allowed to use command words to name things. The
computer already has reserved command words which it understands if you
tell a computer to do something out of the ordinary it is most likely that it will
perform.
Data types
Variables come in a variety of sizes and shapes. Some are used to store text,
some are used to store numbers, and some are used to store data that is far
more complex. This allows the compiler or interpreter of the programmer's
intended usage of the data.
String (text) - used to refer to a sequence of any keyboard characters, including
letters, numbers, and symbols.
Character - Used for single letters.
Integer - Used for whole numbers.
Float (or Real). Used for numbers that contain decimal points, or for fractions.
Boolean - Used where data is restricted to True/False or yes/no options.
Identifier
The base for how data is stored within a programme is made up of variables,
constants, and arrays. They must be declared with proper data types that fit
the data and meaningful identifier names. Programs won't run properly
without the appropriate data types and data structures.
The way to create a constant or a variable is to provide the programming
language with two things these are:
A name
A data type
It is simpler for the next developer to grasp the code if the variables, constants,
and have meaningful names.