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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mcvax!enea!sommar From: sommar@enea.UUCP Newsgroups: comp.lang.ada Subject: Re: Characters with codes >= 128 Message-ID: <2251@enea.UUCP> Date: Sat, 5-Sep-87 16:43:14 EDT Article-I.D.: enea.2251 Posted: Sat Sep 5 16:43:14 1987 Date-Received: Sun, 6-Sep-87 19:47:02 EDT References: <8709020424.AA05821@rand-unix.rand.org> Reply-To: sommar@enea.UUCP(Erland Sommarskog) Followup-To: comp.lang.ada Organization: ENEA DATA Svenska AB, Sweden List-Id: 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