comp.lang.ada
 help / color / mirror / Atom feed
From: stt@ada-uts
Subject: Re: Characters with codes >= 128
Date: Wed, 2-Sep-87 10:24:00 EDT	[thread overview]
Date: Wed Sep  2 10:24:00 1987
Message-ID: <57900043@ada-uts> (raw)
In-Reply-To: 2231@enea.UUCP


You may define your own enumeration type, but you are correct
that only "standard" ASCII graphic characters may be used
in character and string literals.  For "characters" which
have no standard ASCII graphic representation, you should
define normal non-character enumeration literals.

You may then define your own IO package (there is generally nothing
"magical" about TEXT_IO, except that the compiler-writer
has to provide it) to provide I/O for characters and arrays
of these extended characters.

Extended "string" literals can be created via concatenate
of strings containing only graphic characters and enumeration
literals for extended characters.

S. Tucker Taft
Intermetrics, Inc.
Cambridge, MA  02138

P.S.:  Here is an example:

package Extended_ASCII is
    type X_Character is (NUL, SOH, . . ., 'a', 'b', . . .,
      UMLAUT, ALPHA, OMEGA, . . .);
    type X_String is array(Positive range <>) of X_Character;
    pragma Pack(X_String);
end Extended_ASCII;

with Extended_ASCII; use Extended_ASCII;
package X_Text_IO is
    . . .
    procedure Put_Line(Str : X_String);
    . . .
end X_Text_IO;

with Extended_ASCII; use Extended_ASCII;
with X_Text_IO;
procedure Test is
    S : constant X_String :=
      "This is an " & ALPHA & " to " & OMEGA & " test."
begin
    X_Text_IO.Put_Line(S);
end Test;

  reply	other threads:[~1987-09-02 14:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-08-30 21:28 Characters with codes >= 128 sommar
1987-09-02 14:24 ` stt [this message]
  -- strict thread matches above, loose matches on Subject: below --
1987-08-31 20:47 "MARTIN J. MOORE"
1987-09-02  2:35 OCharacters " colbert
1987-09-05 20:43 ` Characters " sommar
1987-09-09 13:29 Jim Moody, DCA C342
1987-09-10  3:47 colbert
1987-09-10 18:39 ` Barry Margolin
1987-09-12 14:47 ` Erland Sommarskog
1987-09-10 12:51 "MARTIN J. MOORE"
1987-09-14 14:28 characters " Jim Moody, DCA C342
1987-09-15 20:55 ` Erland Sommarskog
replies disabled

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