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,9fb64e4c58f1fe X-Google-Attributes: gid103376,public From: tarjeij@ulrik.uio.no (Tarjei Jensen) Subject: Re: overload ":=" ??? Date: 1996/07/23 Message-ID: #1/1 X-Deja-AN: 170235960 references: <4soh73$56h@newsbf02.news.aol.com> organization: University of Oslo, Norway newsgroups: comp.lang.ada Date: 1996-07-23T00:00:00+00:00 List-Id: The problem with bounded string is that it assigns a global maximum string size instead of letting each string have its own maximum size. The former is not particularly flexible while the latter really require a user defined ":=". Not the least because the maximum length of the strings might be different. e.g: a : counted_string(4) := "1234"; b : counted_string(5) := "1234"; -- four characters and space for five a := b; -- Will not work with current version of Ada In this case an user defined assignment operator would be required to make things work or the very least a pragma to tell the compiler what the actual size of the string is. e.g.: type counted_string ( maximum : positive ) is record size : natural; str : string( maximum ); end record; pragma size_controller( counted_string.str, counted_string.size); -- will check size <= maximum -- will check a.maximum >= b.size in example above While I am in wishing mode I would very much like a third alternative to the values of S'Bit_Order. I would very much like to have Most_Significant_Byte_First as a choice (Network order for those who are curious). Greetings, -- // Tarjei T. Jensen // tarjeij@ulrik.uio.no || fax +47 51664292 || voice +47 51 85 87 39 // Support you local rescue centre: GET LOST! // Working, but not speaking for the Norwegian Hydrographic Service.