comp.lang.ada
 help / color / mirror / Atom feed
From: "Adam Beneschan" <adam@irvine.com>
Subject: Re: Usage of \ in Ada
Date: 23 Aug 2006 10:31:25 -0700
Date: 2006-08-23T10:31:25-07:00	[thread overview]
Message-ID: <1156354284.975163.174490@b28g2000cwb.googlegroups.com> (raw)
In-Reply-To: y11pyxvdre7h.iuw8mr3pau4b.dlg@40tude.net

Dmitry A. Kazakov wrote:
> On 22 Aug 2006 11:13:28 -0700, Adam Beneschan wrote:
>
> > Dmitry A. Kazakov wrote:
> >
> >> P.S. it seems that OP question actually cannot be answered. Whether \ is
> >> reserved for a control function depends on the platform.
> >
> > No, it depends on ISO 10646.  And character 92 (\) is not reserved for
> > a control function in that ISO standard.  See also RM95 2.1(17).
>
> Yes, that should exclude the code position 16#5C# (\).
>
> Its wording is interesting, because it uses "code position", and yet leaves
> source representation free. I wonder, if that might lead to confusion.

Apparently it has.  Either you're really confused, or I'm really
confused about what you're trying to say, or possibly both.

Conceptually, an Ada95 program is a sequence of characters, where a
"character" is something defined by ISO 10646 (specifically, the Basic
Multilingual Plane of that standard).  Please note that this is
*conceptually* true and has nothing to do with what bits are used to
represent those characters (on disk, or in memory, or in the bytes that
come down a socket to the compiler from a preprocessor program, or
whatever).  The disk (let's say) will contain some sequence of bits
that isn't defined by the language.  But at some point, the compiler
will interpret that as the mathematical entity that comprises an Ada
source, i.e. the sequence of ISO 10646 BMP characters.  I think that
once you separate, in your mind, the conceptual from the actual
representation on disk, there should be no more confusion.  If the
sequence of characters that makes up an Ada program includes a line
that consists of a series of non-quote characters, followed by a quote
mark, followed by a line separator (2.2(2)), followed by another quote
mark, the program is illegal.  Period.  This doesn't depend on the
platform or on the representation.  On the other hand, a \ character in
a line of the Ada source is treated exactly the same as other
characters that are not letters, digits, underscores, format effectors,
quotation marks, or delimiters; this is also true regardless of the
representation or the platform.

I'm having trouble understanding your point, and I think it's because
you're intermingling the conceptual and representational forms of the
Ada program, so that either I don't know which one you're referring to,
or you're of confusing them and sort of referring to both at the same
time.  It would help if you were clearer about which one you're
discussing.  The actual representation of an Ada source could be an
issue for the OP's question, if TextMate doesn't understand how a
particular Ada compiler converts the representation to the conceptual
form and just displays things as it sees them on disk.  But I've never
heard of an Ada compiler that treats \ in the representation of an Ada
program as having any special meaning inside string literals.  And it
would make no sense for an Ada compiler to treat \" in the disk
representation as representing a quotation mark.

                                      -- Adam




  reply	other threads:[~2006-08-23 17:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21  8:03 Usage of \ in Ada Jerry
2006-08-21  8:11 ` Jacob Sparre Andersen
2006-08-21 19:44 ` Jeffrey R. Carter
2006-08-21 20:25   ` Dmitry A. Kazakov
2006-08-22  2:47     ` Jeffrey R. Carter
2006-08-22  7:42       ` Dmitry A. Kazakov
2006-08-22 18:13         ` Adam Beneschan
2006-08-23  8:35           ` Dmitry A. Kazakov
2006-08-23 17:31             ` Adam Beneschan [this message]
2006-08-23 20:25               ` Dmitry A. Kazakov
2006-08-24  0:22                 ` Adam Beneschan
2006-08-24  8:37                   ` Jean-Pierre Rosen
2006-08-24  9:53                     ` Dmitry A. Kazakov
2006-08-24 12:15                       ` Jean-Pierre Rosen
2006-08-24 14:43                         ` Dmitry A. Kazakov
2006-08-24 15:24                           ` Jean-Pierre Rosen
2006-08-24 17:16                       ` Adam Beneschan
2006-08-22 19:38         ` Jeffrey R. Carter
2006-08-22 21:29           ` Keith Thompson
replies disabled

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