summaryrefslogtreecommitdiffstats
path: root/src/example.txt
diff options
context:
space:
mode:
authorAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-11-20 02:24:52 +0000
committerAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-11-20 02:24:52 +0000
commit68f651f90ac9bb42e6fcb461f72f82ee74df1fdd (patch)
treea94d69ae43cdc92395f1dbac3160bb4d45baa570 /src/example.txt
parent286e177e603d57d445393a0f4899bf7a17a4c31d (diff)
downloadesotericFORTRAN-68f651f90ac9bb42e6fcb461f72f82ee74df1fdd.tar.gz
esotericFORTRAN-68f651f90ac9bb42e6fcb461f72f82ee74df1fdd.zip
Added initial support for do while loops
Diffstat (limited to 'src/example.txt')
-rw-r--r--src/example.txt20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/example.txt b/src/example.txt
index eb453b2..bbc8973 100644
--- a/src/example.txt
+++ b/src/example.txt
@@ -1,13 +1,9 @@
-int ::temp
-int::a
-int::b
-int::i
-a=1
-b=1
-i=0
-do i=0,10
-print*,a," " endprint
-temp =a+b
-a=b
-b=temp
+int::nfact
+int::n
+nfact=1
+n=1
+do while(n<10)
+nfact=nfact*n
+n=n+1
+print*,n," ", nfact endprint
end do \ No newline at end of file