Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Why does FORTRAN distinguish between data types?
Why does FORTRAN distinguish between data types?
According to my personal experience, the reason why programming languages distinguish types,

1: It is easy for programmers to understand that objectifying numbers, such as age, are generally integers, not floating points or

Strings and other types.

2. It helps to save resources. If all types are unified or partial, then when you define a variable, the system

Resources are generally allocated to store them, so that all variables will use a unified space, which will lead to

A certain degree of waste of resources.

3. Considering the overflow problem, if there are types, then each type will have a limit, or interval size.

In this way, when your variable size exceeds a certain limit, it will be detected at compile time and will not become a hidden danger.

4. It is beneficial to the calculation and transformation of variables. We want the operation: character (1.25)+ plastic (10) =1.2510.

Instead of: uniform type (1.25)+ uniform type (10)= 1 1.25.

I hope it helps you!