POV-Ray : Newsgroups : povray.off-topic : Funniest thing I read today : Re: Funniest thing I read today Server Time
11 Oct 2024 07:11:52 EDT (-0400)
  Re: Funniest thing I read today  
From: Alain
Date: 13 Nov 2007 19:44:52
Message: <473a4504$1@news.povray.org>
Darren New nous apporta ses lumieres en ce 2007/11/12 23:45:
> Alain wrote:
>> COBOL, maybe the only computer language where the internal 
>> representation for numbers is a formated string!
> 
> Well, only if you told it to. You had binary numbers, bcd numbers, 
> packed bcd numbers, and "display" numbers, which is what you're talking 
> about.
> 
> Actually, the first mainframe I used had an optional "scientific unit" 
> (aka "floating point processor") and an optional "business unit" (aka 
> string-processing processor). The latter had instructions like block 
> move, BCD math, and (get this) an instruction that took a packed BCD 
> number pointed to by one register and a COBOL display formatting string 
> pointed to by the other register and formatted the number into the space 
> pointed to by a third register, all in one instruction, with floating $, 
> leading zero suppression, putting () around negative values, and 
> everything.
> 
>> It would have been so much simpler to store all numbers and dates as 
>> binary, with input/output formating filters...
> 
> Usually that's what happened. Where people did calculations with the 
> numbers, they used COMP or DECIMAL numbers. Where they printed them, 
> they used DISPLAY numbers.
> 
>  > The peoples who created that must have been crazy! At the time, RAM and
>> storage where at a premium, and you waste precious memory to store 
>> EVERYTHING as strings... Not to mention that doing arithmetics on 
>> strings is prety slow.
> 
> You never actually programmed anything in COBOL, did you?
I did! I folowed some COBOL course, well enough to learn to HATE that thing.

-- 
Alain
-------------------------------------------------
Depression is merely anger without enthusiasm.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.