|
In COBOL, there are really only three data types -
numeric
alphanumeric (text/string)
alphabetic
There is little difference between these data types For instance, it is possible to assign a non-numeric value to a data item that is declared as numeric.
But there is problem with this kind of approach because Cobol programs crashes unexpectedly non-numeric data, it is up to you to make sure this will not happen.
like make sure non-numeric data is not assigned to numeric items meant for calculations. The compiler ensures that a variable of a particular types can only be assigned appropriate values.
|