[Tutor] How does the interpreter determine how many decimal places to display for a float?

boB Stepp robertvstepp at gmail.com
Sun May 16 13:15:27 EDT 2021


On Sun, May 16, 2021 at 11:12 AM Dennis Lee Bieber
<wlfraed at ix.netcom.com> wrote:
>
> On Sat, 15 May 2021 13:45:17 -0500, boB Stepp <robertvstepp at gmail.com>
> declaimed the following:
>
> >
> >I have not studied C.  Looking over the referenced source code,  why
> >do C programmers use such cryptic acronyms for their naming?  I looked
> >up the C standard for naming and there is no prohibition on using
> >descriptive names.  The naming used in this file is reminiscent of my
> >distant FORTRAN days.  Ugh!
> >
>         FORTRAN started in the late 1950s. C goes back to about 1970. Memory on
> large mainframes of that error was still measured in kBytes. The Xerox
> Sigma 6 used at my college (all the way up to and past 1980) was a 1970 or
> so design -- it was spec'd to support 512kBytes (128kWords @ 32-bits;
> 16-bit was a half-word) and managed some 60+ (text) terminals scattered
> over campus. A large program with lots of long names would result in
> compiler tables consuming most of the memory. C & UNIX sort of developed
> together -- ever look at the core shell commands in UNIX: ls, cp, mv, cd =>
> list, copy, move, change_directory?

When I started college in 1975 my university had just recently
installed a mainframe from the IBM 360 family.  I no longer remember
any relevant specs.  This is what I fed my card stacks into to run
programs from the few FORTRAN classes I took and later programs
relevant to my physics major.

I understand about the Unix commands having their usually *brief"
names and that this usage continues till the present.  As it does with
programs like gVim/Vim/vi that started way back when.  I did find it
somewhat surprising that any CPython code would use "cryptic" naming,
since Python originated circa 1989 (Is that about right when GvR
started his project?) when I wouldn't think these naming limitations
still existed for C.

>         Also, compilers may have functioned (and I think GCC still does) by
> generating ASSEMBLER source code, which then got fed to the system
> assembler program. Many assemblers had a 6-8 character LABEL field, and the
> variable/function names from the source language had to be mashed into that
> label field -- and they also had to fit into the assembler
> label->relative_address tables.

This is new to me and helps to provide more context.  Thanks!

boB Stepp


More information about the Tutor mailing list