Python Gotcha with Octal Numbers

jmfbahciv at aol.com jmfbahciv at aol.com
Fri Feb 15 06:09:20 EST 2002


In article <140220020703593280%jwbaxter at spamcop.net>,
   "John W. Baxter" <jwbaxter at spamcop.net> wrote:
>In article <a4geh2$hir$12 at bob.news.rcn.net>, <jmfbahciv at aol.com> wrote:
>
>> In article 
>> <2D484E1BB24678AC.1496996E81BD013F.73A9A3A001BEE345 at lp.airnews.net>,
>>    claird at starbase.neosoft.com (Cameron Laird) wrote:
>> >In article <130220020751360934%jwbaxter at spamcop.net>,
>> >John W. Baxter <jwbaxter at spamcop.net> wrote:
>> >                       .
>> >                       .
>> >                       .
>> >>Did the elves at AT&T pick up the "leading 0 means octal" from
>> >>something earlier, or did they invent this stupidity themselves?
>> >                       .
>> >                       .
>> >                       .
>> >OK, folks, how far back *can* we trace this?  My
>> >mind associates it with DEC systems, going back
>> >to the '60s, but I couldn't find any confirmation
>> >of that in a quick search.
>> 
>> You will never find a DEC standard that ever defined
>> a number with a leading zero to be octal.  I never
>> typed up anything that ever had that kind of standard. 
>
>Well, Digital's hardware was what the AT&T elves worked with, so the
>connection is certainly there, but not necessarily coming in from DEC.

Ah, but they had to define their own standards ;-).


>
>I can't remember from my not-extensive messing about with PDP-1 (serial
>1, provided at no charge and with support by DEC) at MIT whether that
>assembler used a leading 0 to signal octal, or used something else. 

That is before my time.  By the time I started doing stuff, there
were pseudo-ops in the assembler.

I do have two memoes that I found in my office boxes that were
addressed to PDP-1 users.  I don't know the people who wrote
them (Roland Silver, Edward Fredkin) nor where they were. 

The first defines the terms we still use today and the second
specifies all of the info that has to go along with a program.
The example given is a writeup of dvd and i-dvd by Bill 
Fletcher.

There doesn't seem to be any indication about how numbers
are to be viewed in these memoes.




>[Octal was natural on that machine...hex wasn't an issue.]  That
>assembler pretty much moved to the PDP-1 from the older TX-0
>("Transistorized eXperimental" and the round thing is zero) next door.
>
>And then moved on to DEC along with a bunch of people, who were key
>parts of the technical staff for a long time.  That was a very fertile
>"seeding" by the General.  And produced "SpaceWar."

Well, if you can give me a clue about these memoes that I have, I'd
appreciate it.

/BAH

Subtract a hundred and four for e-mail.



More information about the Python-list mailing list