Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!purdue!bu-cs!mirror!frog!john From: john@frog.UUCP (John Woods) Newsgroups: comp.unix.wizards Subject: Re: AT&T 630 terminal - software ?? Message-ID: <1367@X.UUCP> Date: 20 Jan 89 08:02:00 GMT References: <1800005@spdyne> <9434@ihlpb.ATT.COM> Organization: Servants of the Great White Frog Lines: 33 In article <9434@ihlpb.ATT.COM>, gregg@ihlpb.ATT.COM (Wonderly) writes: A> Besides, if you think that your AST/286 is so good, run the following r> C program, if you get the output e> 1 > 70000 y> Your C compiler wins my award for effort otherwise you won't get any o> words of sympathy from me... u> main () > { s> unsigned long i; u> char *s, *malloc(); r> s = malloc ((unsigned)70000); e> for (i=0; i < ((unsigned)70000); i++) ?> s[i] = i; > printf ("%d\n%d\n", s[1], s[(unsigned)70000]); > } Uh............. A C compiler which can figure out from the printf usage that you actually meant to (a) declare s as long *, and (b) malloc and initialize 70,001 longwords instead of 70,000 bytes is probably going to win more than awards... I think you forgot the #pragma Do What I Mean line. -- John Woods, Charles River Data Systems, Framingham MA, (508) 626-1101 ...!decvax!frog!john, john@frog.UUCP, ...!mit-eddie!jfw, jfw@eddie.mit.edu Presumably this means that it is vital to get the wrong answers quickly. Kernighan and Plauger, The Elements of Programming Style