From: tarjeij@ulrik.uio.no (Tarjei Jensen)
Subject: Re: overload ":=" ???
Date: 1996/07/23
Date: 1996-07-23T00:00:00+00:00 [thread overview]
Message-ID: <TARJEIJ.96Jul23153224@ulrik.uio.no> (raw)
In-Reply-To: 4soh73$56h@newsbf02.news.aol.com
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.
next prev parent reply other threads:[~1996-07-23 0:00 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-17 0:00 overload ":=" ??? David Morton
1996-07-17 0:00 ` Robert Dewar
1996-07-18 0:00 ` David Morton
1996-07-19 0:00 ` Brad Balfour
1996-07-19 0:00 ` David Weller
1996-07-18 0:00 ` Laurent Guerby
1996-07-25 0:00 ` Wolfgang Gellerich
1996-07-25 0:00 ` Robert A Duff
1996-07-18 0:00 ` Jon S Anthony
1996-07-18 0:00 ` John Herro
1996-07-18 0:00 ` Robert Dewar
1996-07-19 0:00 ` John Herro
1996-07-21 0:00 ` Laurent Guerby
1996-07-22 0:00 ` Robert A Duff
1996-07-23 0:00 ` Laurent Guerby
1996-07-23 0:00 ` John Herro
1996-07-23 0:00 ` Robert A Duff
1996-07-21 0:00 ` David Morton
1996-07-22 0:00 ` Laurent Guerby
1996-07-22 0:00 ` Laurent Guerby
1996-07-22 0:00 ` David Morton
1996-07-22 0:00 ` Robert Dewar
1996-07-23 0:00 ` Robert A Duff
1996-07-22 0:00 ` Robert Dewar
1996-07-23 0:00 ` Tarjei Jensen [this message]
1996-07-23 0:00 ` Robert A Duff
1996-07-24 0:00 ` Robert I. Eachus
1996-07-19 0:00 ` Joerg Ozimek
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox