SmileeTiger
Programmer
I have a program and I want to have it allocate an array of list node based on user input. In the case below I want to allocata an array of type List_Node called group 1 with size Number of elements. How would I do this?
PROGRAM Sort_List
IMPLICIT NONE
TYPE List_Node
INTEGER :: iName
INTEGER :: iData
END TYPE List_Node
INTEGER :: NumberOfElements
WRITE (*, '(A)') "How many sets of records do you wish to enter?"
READ(*, "(1I5)"
NumberOfElements
WRITE(*,*)NumberOfElements
END PROGRAM Sort_List
PROGRAM Sort_List
IMPLICIT NONE
TYPE List_Node
INTEGER :: iName
INTEGER :: iData
END TYPE List_Node
INTEGER :: NumberOfElements
WRITE (*, '(A)') "How many sets of records do you wish to enter?"
READ(*, "(1I5)"
WRITE(*,*)NumberOfElements
END PROGRAM Sort_List