Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - In Fortran language, equivalence declares that a character variable is equivalent to an element of an integer array. What data is stored?
In Fortran language, equivalence declares that a character variable is equivalent to an element of an integer array. What data is stored?

The data in memory is only binary data. That is, there are only 0s and 1s.

Memory does not distinguish between data types. You have to understand this.

You use this memory through high-level language statements. So, if you pass the variable name a, it is of type integer. If you pass the variable name B, it is of character type.

To use the data of B(1:4), just write B(1:4) directly, such as write(*,*) B(1:4)