From 68f651f90ac9bb42e6fcb461f72f82ee74df1fdd Mon Sep 17 00:00:00 2001 From: AidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com> Date: Sat, 20 Nov 2021 02:24:52 +0000 Subject: Added initial support for do while loops --- src/example.txt | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/example.txt') 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 -- cgit v1.2.3