Article View: comp.arch
Article #11894Re: new instructions
From: Mike McNamara
Date: Thu, 30 May 1991 20:39
Date: Thu, 30 May 1991 20:39
38 lines
1987 bytes
1987 bytes
> 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!! |
+-----------+-----------------------------------------------------------------+
Technical Details
Message-ID:
<MAC.91May30133955@gold.kpc.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sdd.hp.com!mips!kpc.com!ardent!macReferences:
<9105200213.AA05095@ucbvax.Berkeley.EDU> <12526@mentor.cc.purdue.edu> <4711.2843a523@iccgcc.decnet.ab.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <MAC.91May30133955@gold.kpc.com> 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