INST 201 Lecture Notes - Lecture 7: Double-Precision Floating-Point Format, Prime Number, Type B Cipher Machine
Document Summary
Different data types are used for different types of values. If you are trying to represent something with discrete values (i. e. something you might count), integers are usually useful. If the numbers require a broader range, then long integers, which take up more space in memory, are better. If a variable can have fractional or real values, then floating point or double precision numbers will be useful. Some characters cannot be represented by a symbol on the keyboard. Escape sequences let you easily indicate special characters, such as new lines and backspaces. Variables are usually signed, which means they can take on both positive ad negative values. Unsigned variables are always positive, but their positive range is twice as large. Constant variables are good for constants that will be used repeatedly, as they are clearer and allow for modification. Enumerated types are used to create new data types that have a finite range of possible values.