comp.lang.ada
 help / color / mirror / Atom feed
From: sommar@enea.UUCP
Subject: Re: Characters with codes >= 128
Date: Sat, 5-Sep-87 16:43:14 EDT	[thread overview]
Date: Sat Sep  5 16:43:14 1987
Message-ID: <2251@enea.UUCP> (raw)
In-Reply-To: 8709020424.AA05821@rand-unix.rand.org

In a recent article colbert@hermix.UUCP writes:
 >You can create your own Character type by defining an enumeration type that
 >has character literals.
 >	type Character_Type is (Nul, Del, ..., 'A', 'B', ...,
 >				Koo_Kai, Khoo_Khai, ....);
 >...
 >Once you have this character type defined, you can create a string type by
 >defining an array of this character type:
 >
 >	type String_Type is array (positive <>) of Character_Type;
 >...
 >However, you will have to use catenation to create string_type expressions that
 >contain your countries special characters (and of course non-printable
 >characters).
 >...
 >As for the I/O of your language specific characters, you will need to create
 >a Thai_Text_IO (or something equivalent).  Ada does not say that Text_IO is
 >the ONLY text I/O package, only that it is the standard text I/O package.  In
 >this case you need something non-standard.

I think Martin Moore's solution was much more simple and elegant. It will
work on any Ada system that doesn't check character assignments for 
Constraint_error.
  This solution requires one hell lot of work and it isn't portable from
OS to another. Yes, I can write my own Text_IO, but guess how fun I find
that. And, I will have to write one Text_IO for each OS I want to work
with. Guess why there is a standard Text_IO. It gives you a standard 
interface.
  But even better, a change in the language definition would be the 
approriate. It's ridiculus that perfectly good letters are being 
regarded as illegal and unprintable.

-- 

Erland Sommarskog       
ENEA Data, Stockholm    
sommar@enea.UUCP        

  reply	other threads:[~1987-09-05 20:43 UTC|newest]

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

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