Article View: comp.arch
Article #11878Re: new instructions
From: Richard Tobin
Date: Thu, 30 May 1991 16:16
Date: Thu, 30 May 1991 16:16
22 lines
1469 bytes
1469 bytes
In article <4711.2843a523@iccgcc.decnet.ab.com> herrickd@iccgcc.decnet.ab.com writes:
>> 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.
But you were mistaken. Octal constants are written by putting a
leading zero on the number (a horrid convention). Check out "octal
constant" in the index of K&R (either edition).
Example: printf("%d\n", 01234);
-- Richard
--
Richard Tobin, JANET: R.Tobin@uk.ac.ed
AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk
Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin
Technical Details
Message-ID:
<4861@skye.ed.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!mcsun!ukc!edcastle!aiai!richardReferences:
<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!usc!wuarchive!uunet!mcsun!ukc!edcastle!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.arch Subject: Re: new instructions Message-ID: <4861@skye.ed.ac.uk> Date: 30 May 91 16:16:11 GMT References: <9105200213.AA05095@ucbvax.Berkeley.EDU> <12526@mentor.cc.purdue.edu> <4711.2843a523@iccgcc.decnet.ab.com> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 22