Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sdd.hp.com!mips!kpc.com!ardent!mac From: mac@gold.kpc.com (Mike McNamara) Newsgroups: comp.arch Subject: Re: new instructions Message-ID: Date: 30 May 91 20:39:55 GMT References: <9105200213.AA05095@ucbvax.Berkeley.EDU> <12526@mentor.cc.purdue.edu> <4711.2843a523@iccgcc.decnet.ab.com> Sender: uucp@kpc.com (UNIX-to-UNIX Copy) Reply-To: mac@kpc.com Organization: Kubota Pacific Computer Incoporated, Santa Clara, CA Lines: 38 In-Reply-To: herrickd@iccgcc.decnet.ab.com's message of 29 May 91 17:57:06 GMT Nntp-Posting-Host: gold > In article <4711.2843a523@iccgcc.decnet.ab.com> herrickd@iccgcc.decnet.ab.com writes: > > In article <12526@mentor.cc.purdue.edu>, hrubin@pop.stat.purdue.edu (Herman Rubin) writes: > [Herman supplies some of the specifics people have been asking for] > > > There are provisions for octal and hex > > integers [in c], > > I thought so too, and one day I tried to write an integer constant > in octal. The compiler said, "Nuts to you!" It took some hours, > but I finally convinced myself that the compiler manual and then > Kernigan and Ritchie provide octal notation for CHARACTERS. Nothing > else! I thought it was a major design flaw and was no accident. > > dan herrick > herrickd@iccgcc.decnet.ab.com What vendors compiler are you using? consider main(){ int a = 0xabcdef01; int b = 0123567; printf("A is %#x (%d)\n",a,a); printf("B is %#o (%d)\n",b,b); } Produces for me: A is 0xabcdef01 (-1412567295) B is 0123567 (42871) -- +-----------+-----------------------------------------------------------------+ |mac@kpc.com| Increasing Software complexity lets us sell Mainframes as | | | personal computers. Carry on, X windows/Postscript/emacs/CASE!! | +-----------+-----------------------------------------------------------------+