From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 3 Jun 93 20:24:47 GMT From: wdl39!mab@ford-wdl1.arpa (Mark A Biggar) Subject: Re: Representation clauses Message-ID: <1993Jun3.202447.11641@wdl.loral.com> List-Id: [problem with rep clauses and variant records and binary IO] Seriously consider not doing your record IO in binary at all. Write out each record as a line of ascii text with binary values output in formated ascii. This has 3 major advantages. 1) It is completely portable, even between programs running on different CPU architectures. 2) It is very easy to document and maintain. 3) Makes debugging IO problems trivial because you can check your output files by eye. Unless you have an enormous amount of data or hard real-time constraints the overhead added by the text parsing is usually insignifficant. It can even be faster then binary IO when variant records are involved, because may compilers tens to write out binary variant records in fixed size record set at the maximun size, and if most of your record are small this wastes a lot of space and you will often find that the ascii version of the file is smaller enough that the saving in disk IO time more then makes up for the text parsing overhead.