I am setting an integer to a value less than its maximum, but receiving an error that it is too big for it's kind. Why is this? Here is a sample program.
program max_int
integer, parameter :: i32 = selected_int_kind(32)
integer(kind = i32) :: my_int
!The largest integer of this kind
print*, huge(my_int)
!This works
my_int = 100000
!This doesn't, and gives an error.
!my_int = 1000000000000
print*, my_int
end program