From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.5 required=3.0 tests=BAYES_05,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: What is the name of the | symbol? Date: Fri, 25 Mar 2022 22:03:08 +0200 Organization: Tidorum Ltd Message-ID: References: <8c89d912-0672-4e86-b4f3-7893ef0e7183n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net wd1p5h3B1yet8kPieVJuHwP6eI8EOR/rWthWDUja/JintXQsb6 Cancel-Lock: sha1:BGR/74YvX2coo3k+JiteT/nTkA4= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Content-Language: en-US In-Reply-To: <8c89d912-0672-4e86-b4f3-7893ef0e7183n@googlegroups.com> Xref: reader02.eternal-september.org comp.lang.ada:63644 List-Id: On 2022-03-25 21:16, Matt Jaffe wrote: > In using it in a named association array aggregate, its semantics are > "and" --- e.g., some_1D_array := (1 | 3 | 7 => 5, others => 10) sets > elements 1 and 3 and 7 to the value 5. In a case statement, its > semantics are "or" --- e.g. when 1 | 3 | 7 => ... any of the values > 1or 3, or 7 for the case expression will select the ... code for > execution. That is a quirk of natural language, where "and" and "or" are used in non-mathematical ways. You could as well describe the aggregate as saying "if the index is 1 or 3 or 7, the element is 5", and you could describe the case statement as saying "this when-branch is executed when the case selector is 1 and 3 and 7". As '|' is used in some logical formalisms for disjunction ("or"), and in syntactical notation (BNF) to separate alternatives, I tend to read it as "or". > Is there a single name for that symbol (the | ) that seems > to have different semantics depending on context? For the name, see https://en.wikipedia.org/wiki/Vertical_bar, where indeed "vertical bar" seems favoured. However, I'm pretty sure that I have seen "solidus" used, too, but Wikipedia says that is a synonym for "slash" (/). Wiktionary does not recognize "solidus" as a term for any punctuation mark.