I know that many of Y2K's efforts / fears were somehow focused on COBOL, deservedly or not. (hell, I saw a minor Y2K error in Perl scripts that crashed 1/1/2000)
What interests me is whether there was anything special for COBOL as the language that made it susceptible to Y2K problems?
That is, unlike the entire age of most programs written on it and the subsequent need to save on the use of memory / disk, due to old equipment, and the fact that no one expected that these programs would survive for 30 years?
I am completely happy if the answer “nothing special for COBOL except age” is just curious, not knowing anything about COBOL.
Yes and no. In COBOL, you had to declare variables in such a way that you really needed to say how many digits were in the number, i.e. YEAR 99 Declared the YEAR variable so that it could only contain two decimal digits, so yes, it was easier to make this error than in C if you had int or short or char like a year, and you still have a lot of space for years in excess of 99. Of course, this will not protect you from printing 19% d in C and there is still a problem in your release, or other internal thinking-based calculations will be less than 99.
It was 80% of the storage capacity, clean and simple.
, 1980 . , ? 100 000 , 20 .
, , , , 2- .
, COBOL, , COBOL , , , .
- Cobol Y2K?
1. , COBOL 2.
< > 1: 30 . . , 2 , 30 , , .
2: , . >
. Y2K, ? , . , ( ). Cobol : , .
, Y2Kish... , . , , , Y2Kish, ( , , ).
, Y2Kish , , , , ( Java, ), (, ). ? Date ( ) , OS-smart-smart . , ... !
( ) , , , Y2Kish.
. 1- / Cobol 2- 80 .
. 2- , , ! COBOL , , , . , !
-, COBOL 80 (- !), , . , "2000 , !" 2 !
, 0 99 ( , ). , .
- . .
COBOL , .
COBOL
Fortran . , 3000 , . , COBOL, , .
COBOL - .
, .
. , 40 . Y2K .
( . , COBOL, 1950- 2027 , , 1970- , 2079 ).
, COBOL ....
03 ORDER-DATE PIC DATE.
... , .
: .
COBOL 85 (1985 standard) and earlier versions had no way to get the current century **, which was one of the factors inherent in COBOL, which did not encourage the use of four-digit years even after 2 bytes of extra storage was no longer a problem .
** Specific implementations may have had non-standard extensions for this purpose.
Source: https://habr.com/ru/post/1718340/More articles:django - using a common header with some dynamic elements - javascriptCreating CakePHP Page Using HABTM Models - phpThe code for displaying the least power 2 is greater than or equal to an integer - javaSmooth polyline with minimal deformation - c #Django: how to enable model inline fields in list_display? - pythonПочему этот код таймера С# не работает? - c#Connecting all function calls to JavaScript? - javascriptIncrease value over time using a mathematical algorithm - mathCan I update HTML files using Wicket and Eclipse without recompiling classes? - eclipseSmooth movement up the atmosphere - mathAll Articles