Goto Considered Harmful [was Re: Python and the need for speed]

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Apr 14 21:39:05 EDT 2017


Dennis Lee Bieber wrote:
> 	And since the original COBOL standard numeric format was BCD, PIC not
> only defined output layout, but also internal storage needed by numerics
> and string data types.

Unless you said USAGE IS COMPUTATIONAL, which left the compiler
free to pick a more efficient storage format internally.

BTW, one thing I think COBOL did right was not limiting you
to some arbitrary compiler or language defined maximum size
for numbers. You could declare something as PIC 9(100) and
do arithmetic on 100-digit numbers if you wanted. (At least
potentially -- not sure if all compilers would really
support something that big.)

-- 
Greg



More information about the Python-list mailing list