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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: How to write "Hello" to a text file without a line terminator Date: Sun, 14 Aug 2016 09:39:49 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <2cc97e17-313e-44b8-b335-8d5e815e925a@googlegroups.com> <4c49991e-9001-464f-afbb-3fcbf78e5656@googlegroups.com> <41b076f1-66b0-4142-8b91-0e717b6176c2@googlegroups.com> <7dd84caf-d094-4498-a6f1-91e275f09346@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 14 Aug 2016 16:39:56 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d7c030f56102b58a2c16dea977db88bb"; logging-data="5470"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Q5t4eZkkTxNFJemi+5FH91pOnWr+jk1s=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: Cancel-Lock: sha1:mQraKIBocFkX3D3WUV6w1oAo5Yc= Xref: news.eternal-september.org comp.lang.ada:31439 Date: 2016-08-14T09:39:49-07:00 List-Id: On 08/14/2016 01:30 AM, Simon Wright wrote: > AdaMagica writes: > >> Am Samstag, 13. August 2016 20:03:51 UTC+2 schrieb Jeffrey R. Carter: >>> $ ./str_seq_io >>> 32 >>> $ hd junk >>> 00000000 06 00 00 00 00 00 00 00 61 62 63 64 65 66 |........abcdef| >> ???? -- Letters 'A' through 'Z' are at positions 65 through 90 ???? > > 'hd' is (probably) Carter's alias for 'hexdump -C' - the values are in > hex. And, those are letters 'a' .. 'z', not 'A' .. 'Z'. Close. "man hd" gives (Linux Mint 18) HEXDUMP(1) BSD General Commands Manual HEXDUMP(1) NAME hexdump, hd — ASCII, decimal, hexadecimal, octal dump SYNOPSIS hexdump [-bcCdovx] [-e format_string] [-f format_file] [-n length] [-s skip] file ... hd [-bcdovx] [-e format_string] [-f format_file] [-n length] [-s skip] file ... ... -C Canonical hex+ASCII display. Display the input offset in hexa‐ decimal, followed by sixteen space-separated, two column, hexa‐ decimal bytes, followed by the same sixteen bytes in %_p format enclosed in ``|'' characters. Calling the command hd implies this option. And 16#61# = 10#97# = Character'Pos ('a'). Sorry for confusing AdaMagica. > Come to think of it, what would the use case be for instantiating > Sequential (or Direct) IO with an unconstrained type? they both have > only procedural forms for Read, so how could you ever retrieve a value? The unknown-discriminants notation [(<>)] indicates that indefinite types may be used. String is both indefinite and unconstrained, but a variant record with a defaulted discriminant is definite and unconstrained. I don't see much use for Sequential_IO with an indefinite type. On reading, the objects read into would have to match the objects written. -- Jeff Carter "Frankie Wolf, wanted by Federal authorities for dancing with a mailman." Take the Money and Run 143