Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!ucla-cs!sdcrdcf!psivax!csun!aeusemrs From: aeusemrs@csun.UUCP (Mike Stump) Newsgroups: comp.lang.c,net.sources Subject: Re: binary radix (+ some source) Message-ID: <581@csun.UUCP> Date: Mon, 20-Apr-87 15:49:28 EST Article-I.D.: csun.581 Posted: Mon Apr 20 15:49:28 1987 Date-Received: Thu, 23-Apr-87 04:35:44 EST References: <213@pyuxe.UUCP> <710@brl-sem.ARPA> <422@ivax.doc.ic.ac.uk> <2970@pegasus.UUCP> Reply-To: aeusemrs@csun.UUCP (Mike Stump) Organization: California State University, Northridge Lines: 33 Keywords: octal, hex, binary Xref: mnetor comp.lang.c:1840 net.sources:4348 In article <2970@pegasus.UUCP> hansen@pegasus.UUCP (60021254-Tony L. Hansen;LZ 3B-315;6243) writes: >< From: dcw@doc.ic.ac.uk (Duncan C White) >< 2). In Article 1155 of comp.lang.c, bright@dataio.Data-IO.COM, says : >< > How about allowing numbers to be specified in binary radix, >< > as in 0b00110101 ? No existing code would be broken, and it >< > would be very useful to those of us writing graphics code, >< > ... >< > As a corollary, support %b in printf and scanf. >< I agree completely. >I too agree. One of the great things about writing your very own C compiler, is that you get the source code! And with the source code you can CHANGE things, and one of the few things I did to my C compiler, was to add in binary constants, as in 0b1001111. I figure, If I ever give one of my programs to anybody worth his weight, he could figure out what I meant, and change it, or if he had source code to his compiler, add binary constants as a feature... People of the net unite; someone, post the diffs to the Vax, and/or System V C compiler to add binary constants, and everyone else, patch your C compiler, so that it can understand binary constants, after all it will only make your C compiler bigger by a few bytes, and you haver the memory to burn. Do you want to be one of the only people left with an outdated C compiler that does not understand binary constants? Please, no flames; read the above as an attemt to get people seriously thinking about a nice feature. The use of such a feature, until it is widely supported, should be used with a little bit of caution; such as if anybody posts a program to net.source (or whatever they call it this week) with a 0b111011 in it, they should expect to get flames! -- Mike Stump, Cal State Univ, Northridge Comp Sci Department uucp: {sdcrdcf, ihnp4, hplabs, ttidca, psivax, csustan}!csun!aeusemrs