1"use strict";(self.webpackChunkada_lang_io=self.webpackChunkada_lang_io||[]).push([["3799"],{29654(e,n,a){a.r(n),a.d(n,{metadata:()=>s,default:()=>j,frontMatter:()=>h,contentTitle:()=>u,toc:()=>p,assets:()=>x});var s=JSON.parse('{"id":"arm/AA-J/AA-J.2","title":"J.2. Allowed Replacements of Characters","description":"This Reference Manual output has not been verified,","source":"@site/docs/arm/AA-J/AA-J.2.mdx","sourceDirName":"arm/AA-J","slug":"/arm/AA-J/AA-J.2","permalink":"/docs/arm/AA-J/AA-J.2","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":195,"frontMatter":{"sidebar_position":195},"sidebar":"referenceManualSidebar","previous":{"title":"J.1. Renamings of Library Units","permalink":"/docs/arm/AA-J/AA-J.1"},"next":{"title":"J.3. Reduced Accuracy Subtypes","permalink":"/docs/arm/AA-J/AA-J.3"}}'),r=a(74848),t=a(28453),i=a(98113),l=a(60271),c=a(9011),o=a(48554),d=a(94029);let h={sidebar_position:195},u="J.2. Allowed Replacements of Characters",x={},p=[{value:"Syntax",id:"syntax",level:4}];function A(e){let n={a:"a",admonition:"admonition",h1:"h1",h4:"h4",header:"header",p:"p",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"j2-allowed-replacements-of-characters",children:"J.2. Allowed Replacements of Characters"})}),"\n",(0,r.jsx)(n.admonition,{type:"danger",children:(0,r.jsxs)(n.p,{children:["This Reference Manual output has not been verified,\nand may contain omissions or errors.\nReport any problems on the ",(0,r.jsx)(n.a,{href:"https://github.com/ada-lang-io/ada-lang-io/issues/20",children:"tracking issue"})]})}),"\n","\n",(0,r.jsx)(n.h4,{id:"syntax",children:"Syntax"}),"\n",(0,r.jsx)(o.A,{children:"1"}),"\n",(0,r.jsxs)("p",{class:"Indented2",children:["The following replacements are allowed for the vertical line, number sign, and quotation mark characters: ",(0,r.jsx)("br",{})]}),"\n",(0,r.jsx)(o.A,{children:"2"}),"\n",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:["A vertical line character (|) can be replaced by an exclamation mark (!) where used as a delimiter.",(0,r.jsx)("br",{})]}),(0,r.jsx)(o.A,{children:"3"}),(0,r.jsxs)("li",{children:["The number sign characters (","#",") of a ",(0,r.jsx)("code",{children:(0,r.jsx)("a",{href:"/docs/arm/AA-2/AA-2.4#S0011",children:"based_literal"})})," can be replaced by colons (:) provided that the replacement is done for both occurrences. ",(0,r.jsx)("br",{})]})]}),"\n",(0,r.jsxs)(l.A,{children:[(0,r.jsx)(o.A,{children:"3.a/2"}),(0,r.jsx)(d.A,{items:["AI95-00285-01"]}),(0,r.jsx)(i.A,{type:"aarm",aarm:"note",children:(0,r.jsxs)(n.p,{children:[(0,r.jsx)("b",{children:"To be honest: "}),"The intent is that such a replacement works in the Value, Wide","_","Value, and Wide","_","Wide","_","Value attributes, and in the Get procedures of Text","_","IO (and Wide","_","Text","_","IO and Wide","_","Wide","_","Text","_","IO as well)","}",", so that things like \u201C16:.123:\u201D is acceptable. ",(0,r.jsx)("br",{})]})})]}),"\n",(0,r.jsx)(o.A,{children:"4"}),"\n",(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:['The quotation marks (") used as string brackets at both ends of a string literal can be replaced by percent signs (%) provided that the enclosed sequence of characters contains no quotation mark, and provided that both string brackets are replaced. Any percent sign within the sequence of characters shall then be doubled and each such doubled percent sign is interpreted as a single percent sign character value. ',(0,r.jsx)("br",{})]})}),"\n",(0,r.jsx)(o.A,{children:"5"}),"\n",(0,r.jsxs)("p",{class:"Indented2",children:["These replacements do not change the meaning of the program. ",(0,r.jsx)("br",{})]}),"\n",(0,r.jsxs)(l.A,{children:[(0,r.jsx)(o.A,{children:"5.a"}),(0,r.jsx)(i.A,{type:"aarm",aarm:"reason",children:(0,r.jsxs)(n.p,{children:[(0,r.jsx)("b",{}),"The original purpose of this feature was to support hardware (for example, teletype machines) that has long been obsolete. The feature is no longer necessary for that reason. Another use of the feature has been to replace the vertical line character (|) when using certain hardware that treats that character as a (non-English) letter. The feature is no longer necessary for that reason, either, since Ada 95 has full support for international character sets. Therefore, we believe this feature is no longer necessary.",(0,r.jsx)("br",{})]})})]}),"\n",(0,r.jsxs)(l.A,{children:[(0,r.jsx)(o.A,{children:"5.b"}),(0,r.jsx)(i.A,{type:"aarm",aarm:"note",children:(0,r.jsxs)(n.p,{children:["Users of equipment that still uses | to represent a letter will c
1ontinue to do so. Perhaps by next the time Ada is revised, such equipment will no longer be in use.",(0,r.jsx)("br",{})]})})]}),"\n",(0,r.jsxs)(l.A,{children:[(0,r.jsx)(o.A,{children:"5.c"}),(0,r.jsx)(i.A,{type:"aarm",aarm:"note",children:(0,r.jsxs)(n.p,{children:["Note that it was never legal to use this feature as a convenient method of including double quotes in a string without doubling them \u2014 the string literal: ",(0,r.jsx)("br",{})]})})]}),"\n",(0,r.jsxs)(l.A,{children:[(0,r.jsx)(o.A,{children:"5.d"}),(0,r.jsx)(c.A,{language:"ada",children:(0,r.jsxs)(n.p,{children:['%"This is quoted."%',"\n"]})})]}),"\n",(0,r.jsxs)(l.A,{children:[(0,r.jsx)(o.A,{children:"5.e/3"}),(0,r.jsx)(d.A,{items:["AI05-0248-1"]}),(0,r.jsx)(i.A,{type:"aarm",aarm:"note",children:(0,r.jsxs)(n.p,{children:["is not legal in Ada (and never was legal). One has to write: ",(0,r.jsx)("br",{})]})})]}),"\n",(0,r.jsxs)(l.A,{children:[(0,r.jsx)(o.A,{children:"5.f"}),(0,r.jsx)(c.A,{language:"ada",children:(0,r.jsxs)(n.p,{children:['"""This is quoted."""',"\n"]})})]})]})}function j(e={}){let{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(A,{...e})}):A(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.