Re: Possible compiler bug with this simple program



On Aug 28, 8:54 am, Adam Beneschan <a...@xxxxxxxxxx> wrote:

I agree that the compiler should have rejected this. But it might
work to declare Real_Vector as a constrained array:

type Real_Vector is array (0 .. Integer'Last) of Long_Float;

Or, perhaps, declare a subtype:

subtype Constrained_Real_Vector is Real_Vector (0 ..
Integer'Last);

and use the subtype as the parameter type in mapform19 and your access-
to-procedure type.

-- Adam

.



Relevant Pages

  • Re: noob question
    ... DO NOT declare registers as std_logic_vectoror use ... Another option is to use a subtype ... The ugly conversion can be wrapped in a function, ...
    (comp.arch.fpga)
  • Re: Restarting Tread: Why isnt this program working with Unchecked_Converstion
    ... subtype of Integer, you'll need to declare new types: ...   for Short_Integer1'Size use 8; ... The bit representations of these two values are ...
    (comp.lang.ada)
  • Re: Converting
    ... > string literal to a subtype. ... It is illegal to declare two overloaded subprograms that differ only in the ... name if it has a name (and all declarative regions except a declare block ...
    (comp.lang.ada)
  • Re: Base
    ... > using other Ada attributes? ... in order to declare a object with value 0; ... greater than T'Base'Last), then you'll get overflow. ... subtype T is T_Base range 1 .. ...
    (comp.lang.ada)
  • Re: ada calendar
    ... > offset to compute all slices. ... True, but there's an alternative technique, and possibly a better one in ... Obviously, if possible, it is desirable to declare S itself of a subtype ...
    (comp.lang.ada)