diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-07-10 00:23:24 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-07-10 00:23:24 +0900 |
commit | 5bb4d4359a52e9caf331f6001b953dc553df64df (patch) | |
tree | 0e0ef61d88a17bf3fd53ee7bc32d3ec4b765b545 /indenters/example.f90 | |
download | universal-indent-gui-tqt-5bb4d4359a52e9caf331f6001b953dc553df64df.tar.gz universal-indent-gui-tqt-5bb4d4359a52e9caf331f6001b953dc553df64df.zip |
Initial import of UniversalIndentGUI 1.2.0 from Debian snapshot
(https://snapshot.debian.org/package/universalindentgui/1.2.0-1.1).
The code is available under GPL2 licence.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'indenters/example.f90')
-rwxr-xr-x | indenters/example.f90 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/indenters/example.f90 b/indenters/example.f90 new file mode 100755 index 0000000..f2aae7d --- /dev/null +++ b/indenters/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 |