Newsgroups: comp.org.acm Path: utzoo!utgpu!watserv1!watmath!watmsg.waterloo.edu!gvreugdenhil From: gvreugdenhil@watmsg.waterloo.edu (Gord Vreugdenhil) Subject: Re: Turbo the standard? I think not. Message-ID: <1991May8.190631.14173@watmath.waterloo.edu> Sender: news@watmath.waterloo.edu (News Owner) Organization: University of Waterloo References: <1497@caslon.cs.arizona.edu> Date: Wed, 8 May 1991 19:06:31 GMT Lines: 35 In article hvozda@mirkwood.endor.cs.psu.edu (Eric S Hvozda) writes: >Well I always had to use: > >IF condition_not_in_the_case THEN > do_what_the_else_would_have >ELSE > case_here > >>String in the Turbo syntax is much simpler to use and easier to >>read. What's a "packed array"? Why go to the bother of defining > >PACKED ARRAY is to tell the complier to nake the best use of the machines >memory. It certian cases like that of an array of BOOLEAN, it would normally >put one bit per word of storage, but with PACKED, it tells it to use >all the bits in each word. However, a trade off of a greater execution time >may result. > Hmm. I don't have my copy of the Pascal standard handy, but I am pretty sure that the compiler is allowed to interpret ``PACKED'' in any way it wants -- i.e. it *may* choose a more efficient storage method, it may not do anything. Pascal doesn't define storage of any structures; any array may be "packed" by default and have ``PACKED'' be a nop, or never "pack" elements, etc. In an undergrad/grad class we wrote (most of) an ISO Pascal compiler; it stored arrays of chars in a packed format independent of the ``PACKED'' keyword. All other types were the opposite (always unpacked -- including boolean... bleck) due to time constraints. [...stuff deleted...] >Ack! esh101@psuvm.psu.edu ESH101@PSUVM >hvozda@vivaldi.psu.edu hvozda@endor.cs.psu.edu DoD #0217 Gord Vreugdenhil gvreugdenhil@watmsg.waterloo.edu