Unchecked_Conversion in ada

Posted by maddy on Stack Overflow See other posts from Stack Overflow or by maddy
Published on 2010-04-20T06:35:55Z Indexed on 2010/04/20 11:43 UTC
Read the original article Hit count: 387

Filed under:
|

Hi all, Can anyone please make me clear about the use of unchecked conversion in ada language.I had tried the pdf and net but all doesnt give me a clear picture to me.

  Now i have a small piece of code shown below:

    subtype Element4_Range is integer range 1..4;
    subtype Element3_Range is integer range 1..3;
    subtype Myarr_Range is integer range 1..10;
    type Myarr3_Type is array (Myarr_Range) of Element3_Range;
    type Myarr4_Type is array (Myarr_Range) of Element4_Range;
    Myarr3 : Myarr3_Type;
    Myarr4 : Myarr4_Type := (1,2,3,3,1,3,2,1,2,1);
    Count_1 : Integer := 0;
    Count_2 : Integer := 0;
    Count_3 : Integer := 0;
    *function To_Myarr3 is new Unchecked_Conversion(Myarr4_type,Myarr3_type);*

Now my doubt here is what does the function Myarr3 exactly do?

Thanks and regards maddy

© Stack Overflow or respective owner

Related posts about ada

Related posts about unchecked-conversion