comp.lang.ada
 help / color / mirror / Atom feed
From: johnherro@aol.com (John Herro)
Subject: Re: Size of CHARACTER in Ada 83
Date: 1996/09/01
Date: 1996-09-01T00:00:00+00:00	[thread overview]
Message-ID: <50cfv2$s53@newsbf02.news.aol.com> (raw)
In-Reply-To: dewar.841530318@schonberg


dewar@cs.nyu.edu (Robert Dewar) writes:
> If you really want a 128 value character type,
> define it yourself
>    type My_Char is new Character range Character'Val(0) ..
Character'Val(127);
> that will work in all versions of Ada.
> But ... any program that restricts charcters to 128
> values these days is obsolescent, it seems to me.
     Well, I can think of a reason for wanting to restrict a program to
the lower 128 characters.  The high characters look different on different
terminals.  For example, the box drawing characters on a PC in text mode
look entirely different on a VT102.
     In my Ada Tutor program, I use only characters 32 through 126,
drawing boxes with plus signs, minus signs, and vertical bars.  Although
the box drawing characters would be much nicer, my text looks the same on
different platforms.  Here we're talking about portability not among
different Ada compilers, but among different *terminals*.
   An alternative to Robert's suggestion is to write "*SUBTYPE* My_Char is
Character range ... ."  Then (with any version of Ada), you'll be able to
use Text_IO.
- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor




  reply	other threads:[~1996-09-01  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-30  0:00 Size of CHARACTER in Ada 83 James Squire
1996-08-31  0:00 ` Robert Dewar
1996-09-01  0:00   ` John Herro [this message]
1996-09-01  0:00   ` James Squire
replies disabled

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