Changes between Version 121 and Version 122 of IR2
- Timestamp:
- 06/08/21 16:22:03 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR2
v121 v122 83 83 === Notes === 84 84 85 * Parameters are named constants. They can be assigned a constant value, or can be left unconstrained. A parameter looks like a variable but can never be assigned and its address cannot be taken. A constant expression is one comprised of constants, parameters, and a few basic operations, including addition, multiplication, division, modulo, and subtraction. 85 86 * A typedef can be used to define parameterized types. The type parameters are listed between angular brackets preceding the typedef. When the identifier is later used, it must be used with angular brackets and actual type names to replace the type parameters. 86 87 * A declaration declares a variable to have either an object type or a function type. (An object type is any type that is not a function type.) … … 162 163 === Notes === 163 164 165 * Certain basic types can have a specified size---the number of bytes consumed by an object of that type. These basic types include '$bool', '$int', '$char', and '$real'. Two versions of the basic type with different sizes are in fact disjoint types. The basic type without a specified size has domain the union over all sizes of the size-qualified type. 164 166 * Sequences, sets, maps, relations, and `$mem` objects are immutable. An assignment using objects of this type creates a new copy of the object, just as with primitive types like `$int`. 165 167 * Arrays are similar to sequences. The main differences are as follows:
