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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ae40b60d59bcdc4b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-11 18:47:24 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!64.152.100.70!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!e420r-sjo4.usenetserver.com!news-out.usenetserver.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Ada Examples and Problems References: <0F2B6.4430$Ow3.938359@news2-win.server.ntlworld.com> X-Newsreader: Tom's custom newsreader Message-ID: Date: Thu, 12 Apr 2001 01:41:50 GMT NNTP-Posting-Host: 24.20.190.201 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 987039710 24.20.190.201 (Wed, 11 Apr 2001 18:41:50 PDT) NNTP-Posting-Date: Wed, 11 Apr 2001 18:41:50 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: supernews.google.com comp.lang.ada:6798 Date: 2001-04-12T01:41:50+00:00 List-Id: >Maybe this would be a good idea for addition in Ada 0y. An attribute that >gives the total number of bytes/bits occupied by the fields not the record >size. >T'field_bytes The size in memory does not necessarily relate to the size in 'write. It would be legal (if weird) for the 'write to write the bytes values as comma separated integers, each expressed in Roman numerals. >> time how many bytes something is going to occupy in a stream, but Ada >> does not require that an ability to make that determination for all >> types be available. You can determine it at run time by creating a dummy stream with your own procedure Write(Stream : in out My_Type; Item : in Stream_Element_Array); and having that note Item'length for 'Writes on various things.