!xxxxxCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCcccccccc program testit use M_history,only : getline character(len=256) :: line write(*,'(a)')'+------------------------------------------------+' write(*,'(a)')'|TEST OF JUCMD(3f) COMMAND INPUT EDITOR |' write(*,'(a)')'| |' write(*,'(a)')'|Enter a few commands to be passed to the shell |' write(*,'(a)')'|and then enter "r" or "r r_command" on the input|' write(*,'(a)')'|line to go into history edit mode. |' write(*,'(a)')'|once in history edit mode you may enter |' write(*,'(a)')'|"?" to get some help. |' write(*,'(a)')'|Enter the command "quit" to exit |' write(*,'(a)')'|________________________________________________|' INFINITE: do call getline(line) if(line.eq.'quit')then ! exit program if user enters "quit" stop endif ! ! now call user code to process new line of data ! ! As an example, call the system shell ! ! ! ! common f77+ extension passes line as command to system shell call system(line(:len_trim(line))) ! !call execute_command_line(line(:len_trim(line))) ! f08 equivalent enddo INFINITE end program testit !xxxxxCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCcccccccc