Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!MAILER%ALASKA.BITNET@CUNYVM.CUNY.EDU From: MAILER%ALASKA.BITNET@CUNYVM.CUNY.EDU Newsgroups: comp.lang.c Subject: Undelivered mail Message-ID: <12318@brl-adm.ARPA> Date: 12 Mar 88 20:48:09 GMT Sender: news@brl-adm.ARPA Lines: 43 Subject: Re: Pascal --> C question [Non-Deliverable: User does not exist or has never logged on] Reply-To: Info-C@BRL.ARPA Received: From UWAVM(MAILER) by ALASKA with Jnet id 8306 for SXJVK@ALASKA; Sat, 12 Mar 88 11:30 AST Received: by UWAVM (Mailer X1.25) id 5593; Sat, 12 Mar 88 12:29:18 PST Date: Fri, 11 Mar 88 18:40:35 GMT Reply-To: Info-C@BRL.ARPA Sender: Info-C List Comments: Warning -- original Sender: tag was netnews@psuvax1.psu.EDU From: Scott Schwartz Subject: Re: Pascal --> C question Comments: To: info-c@brl-smoke.arpa To: Vic Kapella In article <760@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >In article <3353@psuvax1.psu.edu>, schwartz@gondor.cs.psu.edu (Scott Schwartz) writes: >> So in the >> example I gave each boolean would take up one bit, and there would be >> 1024 of them, the whole array taking up 128 bytes. >The trouble is that a Pascal compiler is absolutely free to ignore >'packed' entirely. When you say > var a: array [0.1023] of boolean; >you have no guarantee at all that the compiler won't use 1024 "words". Right. Lots of (bad) compilers ignore "packed", just like some C compilers ignore "register". For the purpose of argument I was assuming a decent pascal compiler. The University of Sheffield, for example, sells a pascal compiler for Prime 50 series machines that implements "packed" down to the bit level. There's nothing like automatically taking advantage of your instruction set. Anyway, enough pascal talk. On to the next comp.lang.c topic! -- Scott Schwartz | Your array may be without head or schwartz@gondor.cs.psu.edu | tail, yet it will be proof against | defeat. -- Sun Tzu, "The Art of War"