From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ca15935e4fb21334 X-Google-Attributes: gid103376,public From: "Pat Rogers" Subject: Re: Storage space question Date: 1998/12/10 Message-ID: <74or0g$lgt$1@remarQ.com>#1/1 X-Deja-AN: 420837100 References: <9v6hGdgMLuwN-pn2-v5sq1RxFJ1z1@dt182n2f.tampabay.rr.com> <366FE278.FAF73497@pwfl.com> X-Mimeole: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: newsabuse@remarQ.com X-Trace: 913305424 Y6JRGRJUHDE3BC640C usenet80.supernews.com Organization: Software Arts & Sciences Newsgroups: comp.lang.ada Date: 1998-12-10T00:00:00+00:00 List-Id: Marin David Condic wrote in message <366FE278.FAF73497@pwfl.com>... >Craig Allen wrote: >> >> Hello! >> >> the short version of my question is this: If I'm using enumerations >> to define names that will represent specific bit patterns that my program >> may wish to use, do *all* these bit patterns allocate space? e.g. with >> this: >In general, a type does not require any space. Only when you declare >objects of the type is memory allocated. However, the rules of Ada >require that certain information be available at run time concerning a >type, which means the compiler has to keep that information somewhere - >hence memory utilization. Remember that for a given enumeration type T, >Ada has a function T'Image which has to return the character string >associated with the given value (id est, "CARRIER_DETECT", >"SYNC_DETECT", etc.) I don't think that the representation clauses would >have any impact on storage, but maybe one of the compiler-writers in the >crowd can fill us in. See RM C.5(1) re: pragma Discard_Names >"Transported to a surreal landscape, a young girl kills the first woman >she meets and then teams up with three complete strangers to kill >again." > > -- TV listing for the Wizard of Oz :-)