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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7402728c011ea87a X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Efficient io of arbitrary binary data. Date: 1996/09/16 Message-ID: #1/1 X-Deja-AN: 180894082 references: <3239B3B2.1AE4@cray.com> <1996Sep14.153426.1@eisner> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-09-16T00:00:00+00:00 List-Id: In article , Brian Hanson wrote: [stuff about sorting slices of strings] I suggest you define a private type to represent your string-slice pointers. Each string pointer is represented as a low and high bound, or low bound and length, or whatever, relative to the buffer. You can even use an access type pointing to the first character, plus a length, if you make the buffer components aliased. Then write your sorting routine in terms of this private data type. Make sure the buffer is immutable (that is, don't allow modifications while string-slice-pointers are in use). - Bob