diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-04-18 20:47:44 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-04-18 20:47:44 +0900 |
commit | 425e16ad894fd23d7c5b061acffba6cd04a1b1db (patch) | |
tree | e1f794e07812bcd59a4b518747bf9dc5c2a5a163 /indenters/__TODO/example.f90 | |
parent | 11451cea9db07b2a257297de57d76a8dbb7e3a5e (diff) | |
download | universal-indent-gui-tqt-425e16ad894fd23d7c5b061acffba6cd04a1b1db.tar.gz universal-indent-gui-tqt-425e16ad894fd23d7c5b061acffba6cd04a1b1db.zip |
Added code to load last open file or an example or an untitled file.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'indenters/__TODO/example.f90')
-rwxr-xr-x | indenters/__TODO/example.f90 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/indenters/__TODO/example.f90 b/indenters/__TODO/example.f90 new file mode 100755 index 0000000..8131b8b --- /dev/null +++ b/indenters/__TODO/example.f90 @@ -0,0 +1,33 @@ +module module1
+! Identity of a utility +! ____________________________________________________________________
+ character (len=*), parameter :: xyz = & +"I am just a more or less long string."
+ character (len=*), parameter :: zhlp = '( &
+&"This program is free software; you can redistribute it and/or modify"/&
+&"____________________________________________________________________")'
+integer:: n +contains + +recursive subroutine sub1(x) +integer,intent(inout):: x +integer:: y +y=0 +if (x<n) then + x= x + 1 + y =x**2 + print *, 'x = ', x,', y = ', y + call sub1(x) + print *, 'x = ', x,', y = ', y +end if +end subroutine sub1 + +end module module1 + +program main +use module1 +integer:: x = 0 +print *, 'Enter number of repeats' +read (*,*) n +call sub1(x) +end program main
\ No newline at end of file |