Program Main
Implicit None
Integer, Parameter :: iwp = SELECTED_Real_KIND(15)
Integer, allocatable :: Num(:)
Num(1)=1
......
End Program Main
When I use allocatable to define a void array 'num' and then run the program, it reveals that error as below
(1)"First-chance exception at 0x00B21147 in Index.exe: 0xC0000005: Access violation writing location 0x00000004"
(2)"If there is a handler for this exception, the program may be safely continued"