I am trying to understand how to use hexadecimal numbers properly. When I compile the following program, I am getting the following warning when assigning a hex value to a variable:
warning #6473: Fortran 2008 does not allow boz constant in this context. [Z'0000000F']
However, there is no warning if I fist set a PARAMETER to this value, and then assign it to a variable. Is this the correct behavior?
program test_hexint implicit none integer a, b integer,parameter:: c = Z'0000000f' a = Z'0000000f' ! warning #6473: Fortran 2008 does not allow boz constant in this context. b = c ! no warning write(*,*) a, b stop end program test_hexint