From: Marin David Condic <mcondic.nospam@acm.org>
Subject: Re: Escape Sequences in Strings
Date: 2000/11/16
Date: 2000-11-16T14:32:49+00:00 [thread overview]
Message-ID: <3A13F04A.6D36C736@acm.org> (raw)
In-Reply-To: iqRQ5.2853$6W1.182712@news.flash.net
Ken Garlington wrote:
> Character C_Escape_Sequence Ada_Equivalent
> " \" "" or Ada.Characters.Latin_1.Quotation
> ' \' ' or Ada.Characters.Latin_1.Apostrophe
> ? \? ? or Ada.Characters.Latin_1.Question
> \ \\ \ or Ada.Characters.Latin_1.Reverse_Solidus
> BEL \a Ada.Characters.Latin_1.BEL
> BS \b Ada.Characters.Latin_1.BS
> FF \f Ada.Characters.Latin_1.FF
> NL \n Ada.Characters.Latin_1.NL
> CR \r Ada.Characters.Latin_1.CR
> HT \t Ada.Characters.Latin_1.HT
> VT \v Ada.Characters.Latin_1.VT
> octal \ddd Character'Val(8#ddd#)
> hex \xhh Character'Val(16#hh#)
And you can even avoid the verbosity (if desired) using a "use" clause as in:
with Ada.Characters.Latin_1 ;
use Ada.Characters.Latin_1 ;
procedure Demo is
Some_String : constant String := "Ring the bell: " & BEL & "New Page:
" & FF ;
begin
null ;
end Demo ;
Its pretty obvious to us Ada Old Timers, but a newbie might see "Ring the
bell: " & Ada.Characters.Latin_1.BEL as so needlessly verbose that they'll run
off telling everyone that Ada sucks because they can't write "Ring the bell:
\a". If it were true, they'd have a point.
Just a small thing - but often something we forget.
MDC
--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at: http://www.mcondic.com/
"Giving money and power to Government is like giving whiskey
and car keys to teenage boys."
-- P. J. O'Rourke
======================================================================
next prev parent reply other threads:[~2000-11-16 0:00 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-15 0:00 Escape Sequences in Strings Jean Cohen
2000-11-15 0:00 ` John English
2000-11-15 0:00 ` Robert Dewar
2000-11-15 0:00 ` Ehud Lamm
2000-11-16 0:00 ` John English
2000-11-16 0:00 ` Tarjei T. Jensen
2000-11-16 0:00 ` Ken Garlington
2000-11-16 0:00 ` Marin David Condic [this message]
2000-11-16 0:00 ` Keith Thompson
2000-11-16 0:00 ` Marin David Condic
2000-11-15 0:00 ` Marin David Condic
2000-11-16 0:00 ` Ada Streams usage (was Escape Sequences in Strings) Marc A. Criley
2000-11-16 0:00 ` Marin David Condic
2000-11-16 0:00 ` Ted Dennison
2000-11-16 0:00 ` Marin David Condic
2000-11-16 0:00 ` Ted Dennison
2000-11-16 0:00 ` Marin David Condic
[not found] ` <igh81t8b3hdrsc167do6qr0h1joa73c1jr@borpin.co.uk>
2000-11-18 0:00 ` Marin David Condic
2000-11-18 0:00 ` David Kristola
2000-11-19 0:00 ` Marin David Condic
2000-11-19 0:00 ` Marin David Condic
2000-11-20 0:00 ` Brian Orpin
2000-11-20 0:00 ` Marin David Condic
2000-11-19 0:00 ` Ted Dennison
2000-11-19 0:00 ` Marin David Condic
2000-11-19 0:00 ` Robert Dewar
2000-11-20 0:00 ` Marin David Condic
2000-11-21 0:00 ` Robert Dewar
2000-11-20 0:00 ` Randy Brukardt
2000-11-21 0:00 ` Ted Dennison
2000-11-21 0:00 ` Randy Brukardt
2000-11-21 1:31 ` Robert Dewar
2000-11-21 1:33 ` Robert Dewar
2000-11-21 0:00 ` Randy Brukardt
2000-11-22 5:00 ` Robert Dewar
2000-11-19 0:00 ` Ted Dennison
2000-11-19 0:00 ` Robert Dewar
2000-11-15 0:00 ` Escape Sequences in Strings Preben Randhol
2001-01-12 13:18 ` Andrew Hately
2001-01-12 20:03 ` Keith Thompson
2001-01-18 8:29 ` Lao Xiao Hai
2001-01-18 15:22 ` Robert Dewar
2001-01-18 22:43 ` Randy Brukardt
2001-01-21 11:54 ` Dale Stanbrough
2001-01-21 22:35 ` directly accessing DOS screen memory (was: Re: Escape Sequences in Strings) Jeffrey Carter
2001-01-12 19:37 ` Escape Sequences in Strings tmoran
2001-01-13 1:38 ` Robert Dewar
2001-01-13 6:48 ` tmoran
2001-01-13 18:36 ` Robert Dewar
2001-01-16 3:30 ` Examples in Docs, was " peter_richtmyer
2001-01-16 5:42 ` Robert Dewar
2001-01-16 20:44 ` mark_lundquist
2001-01-16 22:43 ` Larry Kilgallen
2001-01-17 15:06 ` mark_lundquist
2001-01-17 2:25 ` Robert Dewar
2001-01-17 15:28 ` mark_lundquist
2001-01-17 16:20 ` Brian Rogoff
2001-01-17 18:04 ` Wayne Lydecker
2001-01-17 19:23 ` BSCrawford
2001-01-18 0:15 ` Jerry Petrey
2001-01-19 0:01 ` tmoran
2001-01-18 3:44 ` Robert Dewar
2001-01-18 16:45 ` Brian Rogoff
2001-01-18 19:53 ` Robert Dewar
2001-01-18 22:58 ` Georg Bauhaus
2001-01-19 16:40 ` Robert Dewar
2001-01-19 7:49 ` Learning methods Anders Wirzenius
2001-01-19 18:57 ` Examples in Docs, was Re: Escape Sequences in Strings mark_lundquist
2001-01-21 12:05 ` Dale Stanbrough
2001-01-21 15:35 ` Robert Dewar
2001-01-17 22:10 ` Matthew Woodcraft
2001-01-18 3:52 ` Robert Dewar
2001-01-16 16:06 ` Examples in Docs Robert C. Leif, Ph.D.
2001-01-16 21:29 ` mark_lundquist
2001-01-18 0:50 ` Randy Brukardt
2001-01-18 16:46 ` mark_lundquist
2001-01-18 17:24 ` J. David Bryan
2001-01-17 2:43 ` Robert Dewar
2001-01-17 21:17 ` Robert C. Leif, Ph.D.
2001-01-16 20:01 ` Examples in Docs, was Re: Escape Sequences in Strings mark_lundquist
2001-01-17 10:59 ` Peter Richtmyer
2001-01-19 18:55 ` mark_lundquist
2001-01-20 14:24 ` Robert Dewar
2001-01-20 14:36 ` Preben Randhol
2001-01-20 15:00 ` Robert Dewar
2001-01-21 11:24 ` Preben Randhol
2001-01-22 14:47 ` Ted Dennison
2001-01-22 20:08 ` Preben Randhol
2001-01-22 20:14 ` Preben Randhol
2001-01-20 19:02 ` Stephen Leake
2001-01-20 19:50 ` Georg Bauhaus
2001-01-21 11:35 ` Preben Randhol
2001-01-22 23:58 ` Mark Lundquist
2001-01-27 1:43 ` Increasing the readability of Ada was RE: Examples in Docs Robert C. Leif, Ph.D.
-- strict thread matches above, loose matches on Subject: below --
2000-11-16 0:00 Escape Sequences in Strings Jean Cohen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox