ever want to use the predefined type Integer?
The language itself provides some guidance here. The predefined type Integer is used by Ada in the implementation of a number of convenient services. The following examples describe some of these services. Notice that in most of the following examples, it is unlikely that it will ever matter whether or not the predefined type Integer is 16-bits, 32-bits, 48-bits, or 64-bits. a) The exponentiation of X (written X**N) is defined by the language for any floating point or integer X, provided N is of type Integer. (N should be non-negative for integer X though.) b) Ada’s predefined String type (really just a packed unconstrained array of characters) uses an index of subtype Positive (i.e. type Integer). c) The array index in the following “short-hand” array declaration is implicitly defined to be type Integer: A : array(10..40) of Float; d) The loop parameter I in the following for loop is implicitly declared type Integer: for I in 10..40 loop … end loop; This application of type Integer
Related Questions
- I want to create an attribute/parameter/return type of type String / Integer / Boolean / Double / ..., but I cannot find the type in the combobox. Is this a bug?
- For Example I have a DB column of type INTEGER but a class atribute of type boolean. How can I provide an automatic mapping with OJB?
- ever want to use the predefined type Integer?