3 ms·
Oh well, isn't understanding how data types represented one of the first a few thing to begin with a programming language?
by mrjin 5y ago
Oh well, isn't understanding how data types represented one of the first a few thing to begin with a programming language?
- lokedhs 5y agoExcept in COBOL, data types are decimal, which means that whatever datatypes you choose to use in a modern language will not work the same as they do in COBOL. Also consider that the COBOL datatypes are directly represented in the underlying storage, so whatever format you decide to represent a value in in the code is the same format that will be used for external communication. If you want to retain compatibility with COBOL, you're probably going to need a COBOL-compatible numeric library in whatever language you're using. at least if you want to just reimplement the original code.
- chasil 5y agoWhat this article is trying to tell you is that COBOL uses fixed-point arithmetic, often BCD. It was standardized two decades before ieee-754, that we now take for granted. The math is wildly different.