TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
Date:
Thu, 21 Nov 2002 15:14:04 +0530
Content-type:
text/plain; charset=us-ascii
MIME-Version:
1.0
Reply-To:
Parts/Attachments:
text/plain (29 lines)
Hello sir,
      i had a small doubt regarding the size occupied by the variable of a
boolean type.
x : boolean;
begin
      put(boolean'size);  -- it is giving 1 bit
      put(x'size); -- it is returning  8 bits
end

why is it so?

actuallly i want to type cast a array of boolean type into an integer
value.

type arr_type is array(integer range 1..2) of boolean;

function uncheck is new unchecked_conversion(arr_type,integer);

a(1) := TRUE
a(2) := TRUE

when converted, the value i am getting is 257 instead of 3
can u please give me some suggestion regarding this



Thanks & Regards,
D.V.MAHIDHAR,

ATOM RSS1 RSS2