comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: wide_string and assertions
Date: Thu, 3 Jun 2004 22:37:50 -0500
Date: 2004-06-03T22:37:50-05:00	[thread overview]
Message-ID: <47SdnXI-D-3icyLdRVn-uQ@megapath.net> (raw)
In-Reply-To: c9nj9l$cif$1@a1-hrz.uni-duisburg.de

"Georg Bauhaus" <sb463ba@l1-hrz.uni-duisburg.de> wrote in message
news:c9nj9l$cif$1@a1-hrz.uni-duisburg.de...
> AI-00286 present pragma assert with two arguments, one
> of them a string. (Likewise, exceptions can be raised
> "with a string"). I have some messages I want use as
> the second argument. They contain characters outside
> Latin-1. (And another 8bit character set won't do.)
>
> In an assert(x, y), y has to be static. So I guess for y I
> will have to play tricks and use UTF-8 coding of static
> String values?

Yes.

> Has using Wide_String variants ever been considered? Or
> is there just "no demand"?

Ada.Exceptions only supports String for exception messages. Assert just uses
that existing mechanism for handling messages.

As far as demand goes, you're the first person to mention it to my
knowledge -- which is suggests that the demand is low. :-)

I'd like to see better support for UTF-8, but I don't think anything
sensible would really work in Assert (because the argument is static). Of
course, a function would work when raising with a message:
    raise Assert_Error with To_UTF_8 ("Wide_Wide_String");
so that might be preferable for this purpose. (But you'll probably have to
write the function yourself; there doesn't seem to be much support for
including such functions in the Standard.)

                        Randy.





  reply	other threads:[~2004-06-04  3:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-03 16:23 wide_string and assertions Georg Bauhaus
2004-06-04  3:37 ` Randy Brukardt [this message]
2004-06-04  8:49   ` Martin Krischik
2004-06-05  8:42     ` Pascal Obry
2004-06-05 17:15       ` Martin Krischik
2004-06-04 17:48   ` Georg Bauhaus
2004-06-05  7:10     ` Martin Krischik
2004-06-05 11:37       ` Georg Bauhaus
2004-06-05 17:11         ` Martin Krischik
2004-06-05 18:41         ` Björn Persson
2004-06-08 16:41           ` Georg Bauhaus
2004-06-09 13:19             ` Björn Persson
2004-06-09 15:03               ` Georg Bauhaus
2004-06-09 15:26                 ` Björn Persson
2004-06-10 12:25                   ` Georg Bauhaus
2004-06-10 13:30                     ` Björn Persson
2004-06-05 12:32     ` China Björn Persson
2004-06-05 16:49       ` China, character sets Georg Bauhaus
2004-06-05 21:50       ` China Alexander E. Kopilovich
2004-06-04 20:42   ` wide_string and assertions Nick Roberts
2004-06-06 13:23   ` Björn Persson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox