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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,20c75acdaea028c3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!75g2000cwc.googlegroups.com!not-for-mail From: "Adam Beneschan" Newsgroups: comp.lang.ada Subject: Re: Usage of \ in Ada Date: 23 Aug 2006 17:22:41 -0700 Organization: http://groups.google.com Message-ID: <1156378961.270464.303590@75g2000cwc.googlegroups.com> References: <1156147411.215015.31110@i42g2000cwa.googlegroups.com> <17jicmx6si17i.1wwvf6cafw7u1.dlg@40tude.net> <1thd8agjty9cr.dyp1m8yqb4xd$.dlg@40tude.net> <1156270408.443763.15680@h48g2000cwc.googlegroups.com> <1156354284.975163.174490@b28g2000cwb.googlegroups.com> <1j9zi3r2docoq$.5gnvkzmffdxu.dlg@40tude.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1156378967 10773 127.0.0.1 (24 Aug 2006 00:22:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 24 Aug 2006 00:22:47 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 75g2000cwc.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news2.google.com comp.lang.ada:6329 Date: 2006-08-23T17:22:41-07:00 List-Id: Dmitry A. Kazakov wrote: > What I meant is a rationale behind the choice made to reference some code > positions as potentially illegal. I don't understand the reason why, > provided that the source representation is explicitly stated as irrelevant. > As an example, I gave a program in HTML or XML encoding, which > representation allows to place *any* code position into a string literal. > According to ARM this program could be illegal, without obvious reason. It's probably to prevent stupid errors. If you have a string literal with an LF in it, it's far more likely (using a fairly traditional representation of the source) that you've forgotten a closing quote than that you intended to put a linefeed in the literal. And if the language did try to allow a line separator in a string literal (even if it were represented as something like \n in the representation), it would have to change the definition of what constitutes a "line" since some line separators would not really be line separators, and IMHO things would get pretty muddled. I don't know if there's any particular rationale for not allowing other control characters, except that doing so would probably reduce portability (e.g. try to port a source program with character'val(26) in a string literal from some other system to Windows). -- Adam