comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: Streams in Ada
Date: Mon, 02 Apr 2001 15:49:51 GMT
Date: 2001-04-02T15:49:51+00:00	[thread overview]
Message-ID: <zc1y6.352$UK4.34815@www.newsranger.com> (raw)
In-Reply-To: tgofufwd4x.fsf@mercury.rus.uni-stuttgart.de

In article <tgofufwd4x.fsf@mercury.rus.uni-stuttgart.de>, Florian Weimer says...
>
>"Marin David Condic" <marin.condic.auntie.spam@pacemicro.com> writes:
>
>> But wouldn't that posit that there *was* an Ada95 implementation on a PDP-10
>> and that a Stream_Element was 36 bits?
>
>Well, the poster specifically mentioned portability, and his code does
>not work on such an architecture.  IMHO, portable code hasn't just to
>run on all platforms which exist (this could be called 'practically
>portable code'), but on all Ada implementations.

I think you meant, "all possible Ada implementations", which I would disagree
with. On the other hand, if we were to interpret this to say "on all likely
implementations", I could agree with you. I'll leave it up to others how likely
a conforming Ada95 PDP-10 implementation is.

However, this wouldn't actually have been a problem anyway, because the code I
wrote assumes that the user also has something close to the following
declarations:

type User_Element is mod 256;  -- Could be any multiple of this
for User_Element'size use 8;   -- Could be any matching multiple of this
type Byte_Array is array (<> Natural) of Byte;

And then the hard-coded 8's and 7's in the code I posted before would *really*
be "User_Element'size" and "(User_Element'size - 1)". I just used the hard-coded
8 as a short-cut for implying the above. On platforms with different byte sizes,
it is the user's "mod" and "'size" declarations that would be changed. (Are they
buying it? :-)  )

Out of curiosity, what exactly constituted a "byte" on a PDP-10?

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



  reply	other threads:[~2001-04-02 15:49 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-31 14:49 Streams in Ada chris.danx
2001-03-31 15:22 ` chris.danx
2001-03-31 21:37   ` Jeff Creem
2001-03-31 21:49     ` chris.danx
2001-03-31 22:21       ` Robert A Duff
2001-03-31 22:33         ` chris.danx
2001-04-02 13:47         ` Ted Dennison
2001-04-02 14:03           ` Florian Weimer
2001-04-02 14:29             ` Ted Dennison
2001-04-02 14:54               ` Robert A Duff
2001-04-02 14:47             ` Marin David Condic
2001-04-02 15:10               ` Florian Weimer
2001-04-02 15:49                 ` Ted Dennison [this message]
2001-04-02 16:57                   ` Marin David Condic
2001-04-02 17:43                     ` PDP-10, was " tmoran
2001-04-02 17:49                     ` Robert A Duff
2001-04-02 22:09                       ` 6-bit characters (was: Re: Streams in Ada) Jeffrey Carter
2001-04-02 23:29                         ` Robert A Duff
2001-04-03 16:41                           ` Jeffrey Carter
2001-04-03 17:57                             ` Florian Weimer
2001-04-03 18:19                               ` Marin David Condic
2001-04-05 18:37                                 ` Tucker Taft
2001-04-03 18:04                             ` Marin David Condic
2001-04-06 22:40                             ` Robert A Duff
2001-04-03 14:10                         ` Marin David Condic
2001-04-03  1:57                       ` Streams in Ada Larry Kilgallen
2001-04-03 14:13                         ` Marin David Condic
2001-04-13 23:21                         ` Robert A Duff
2001-04-02 17:41                   ` Florian Weimer
2001-04-02 18:17                     ` Robert A Duff
2001-04-02 19:36                       ` Marin David Condic
2001-04-02 20:54                         ` Robert A Duff
2001-04-03 10:10                         ` Florian Weimer
2001-04-03 14:21                           ` Marin David Condic
2001-04-03 18:15                             ` Florian Weimer
2001-04-03 23:21                               ` Robert A Duff
2001-04-02 21:13                       ` Florian Weimer
2001-04-02 21:22                         ` Robert A Duff
2001-04-03 10:02                           ` Florian Weimer
2001-04-02 16:42                 ` Marin David Condic
2001-04-13  5:00                 ` David Thompson
2001-03-31 20:48 ` James Rogers
2001-03-31 21:20   ` chris.danx
2001-03-31 21:22     ` chris.danx
2001-03-31 23:10     ` David C. Hoos, Sr.
2001-04-01 11:27       ` chris.danx
2001-04-02 14:12     ` Ted Dennison
2001-04-02 14:00   ` Ted Dennison
  -- strict thread matches above, loose matches on Subject: below --
2001-04-05 14:24 Brian Gaffney
2001-04-06 22:54 ` Robert A Duff
replies disabled

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