Skip to content

Instantly share code, notes, and snippets.

@ComingNine
Created July 6, 2012 20:19
Show Gist options
  • Save ComingNine/631152d69bef02262431 to your computer and use it in GitHub Desktop.
Save ComingNine/631152d69bef02262431 to your computer and use it in GitHub Desktop.
TestCase of LoadFromFile/SaveToFile of Fortran version of Delphi's TStringList
!***|****1****|****2****|****3****|****4****|****5****|****6****|****7**
PROGRAM Test_Classes_TStringList
IMPLICIT NONE
USE System
USE Classes_TStringList
IMPLICIT NONE
INTEGER :: time_begin, time_end, time_rate
TYPE(TStringList) :: list
WRITE (*,'(A)') 'Test_Classes_TStringList_SaveToFile begins.'
call KMP_SET_BLOCKTIME(0)
CALL SYSTEM_CLOCK (time_begin, time_rate)
CALL list%LoadFromFile ('Files' // PathDelim // 'test_classes_tstringlist' // PathDelim // 'TRIPLE_60_CORRECT_INT_stepsize_1.in')
CALL list%SaveToFile ('Files' // PathDelim // 'test_classes_tstringlist' // PathDelim // 'TRIPLE_60_CORRECT_INT_stepsize_1_SAVED.in')
CALL SYSTEM_CLOCK (time_end, time_rate)
WRITE (*,'(F11.4, A)') (time_end - time_begin) * 1.0_DP / time_rate, ' seconds '
WRITE (*,'(A)') 'Test_Classes_TStringList_SaveToFile ends.'
END PROGRAM Test_Classes_TStringList
!***|****1****|****2****|****3****|****4****|****5****|****6****|****7**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment