comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: How to write "Hello" to a text file without a line terminator
Date: Sun, 14 Aug 2016 09:39:49 -0700
Date: 2016-08-14T09:39:49-07:00	[thread overview]
Message-ID: <noq6sq$5au$1@dont-email.me> (raw)
In-Reply-To: <lyvaz321nv.fsf@pushface.org>

On 08/14/2016 01:30 AM, Simon Wright wrote:
> AdaMagica <christ-usch.grein@t-online.de> 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

  parent reply	other threads:[~2016-08-14 16:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12  4:05 How to write "Hello" to a text file without a line terminator Jerry
2016-08-12  6:41 ` G.B.
2016-08-12  7:23 ` Dmitry A. Kazakov
2016-08-12  7:41   ` J-P. Rosen
2016-08-12  7:46     ` Jerry
2016-08-12  7:44   ` Jerry
2016-08-12 17:34     ` Jeffrey R. Carter
2016-08-13  3:21       ` Jerry
2016-08-13  4:23         ` Jeffrey R. Carter
2016-08-13  9:12           ` AdaMagica
2016-08-13 18:03             ` Jeffrey R. Carter
2016-08-14  7:58               ` AdaMagica
2016-08-14  8:30                 ` Simon Wright
2016-08-14  8:54                   ` Dmitry A. Kazakov
2016-08-14  9:40                     ` Simon Wright
2016-08-14 10:17                       ` Dmitry A. Kazakov
2016-08-14 11:28                         ` Simon Wright
2016-08-14 13:31                           ` Dmitry A. Kazakov
2016-08-15 23:35                       ` Randy Brukardt
2016-08-14 13:28                   ` AdaMagica
2016-08-14 13:54                     ` Simon Wright
2016-08-14 17:05                     ` Jeffrey R. Carter
2016-08-14 18:26                       ` AdaMagica
2016-08-14 19:19                         ` Dmitry A. Kazakov
2016-08-14 13:32                   ` AdaMagica
2016-08-14 16:39                   ` Jeffrey R. Carter [this message]
2016-08-12  7:46   ` Simon Wright
     [not found]   ` <noka54$ci$1@dont-email.me>
2016-08-12 13:44     ` Dmitry A. Kazakov
replies disabled

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