comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: Performance of the Streams 'Read and 'Write
Date: Sun, 1 Nov 2009 13:38:44 -0800 (PST)
Date: 2009-11-01T13:38:44-08:00	[thread overview]
Message-ID: <fae1da29-2ccd-431c-8758-6c5a655f142c@v30g2000yqm.googlegroups.com> (raw)
In-Reply-To: hcfdpo$p62$1@news.tornevall.net

Jeffrey R. Carter:
> If you're
> really paranoid, you can add a test that Unsigned_8'Size = Stream_Element'Size,
> which you seem to be assuming.

Yet a bit more paranoid: checking the size of arrays!

  workaround_possible: Boolean;

  procedure Check_workaround is
    test_a: constant Byte_Buffer(1..10):= (others => 0);
    test_b: constant Ada.Streams.Stream_Element_Array(1..10):= (others
=> 0);
  begin
    workaround_possible:= test_a'Size = test_b'Size;
  end Check_workaround;

It's the code I've put into Zip-Ada - big success!
:-)
_________________________________________________________
Gautier's Ada programming -- http://sf.net/users/gdemont/
NB: For a direct answer, e-mail address on the Web site!



  parent reply	other threads:[~2009-11-01 21:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 23:29 Performance of the Streams 'Read and 'Write Gautier write-only
2009-10-30  0:39 ` Jeffrey R. Carter
2009-10-30  8:58   ` Gautier write-only
2009-10-30 19:12     ` Jeffrey R. Carter
2009-10-31 23:46       ` Gautier write-only
2009-11-01 21:38       ` Gautier write-only [this message]
2009-11-02 21:32       ` Randy Brukardt
2009-10-30  3:36 ` Georg Bauhaus
2009-10-30  9:13   ` Gautier write-only
2009-11-02 21:37     ` Randy Brukardt
2009-11-02 22:16       ` Gautier write-only
2009-10-30 13:40 ` Gautier write-only
2009-11-02 22:19   ` Gautier write-only
2009-11-17 12:57 ` Gautier write-only
2009-11-17 13:26   ` Ludovic Brenta
2009-11-17 20:19   ` Building GNAT on Windows (Was: Re: Performance of the Streams 'Read and 'Write) Tero Koskinen
2009-11-18 10:55     ` Gautier write-only
2009-11-26 13:23   ` Performance of the Streams 'Read and 'Write Gautier write-only
replies disabled

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