Arithmetics+corrections (expressions only)

This commit is contained in:
Dmitry Boulytchev 2018-10-23 23:18:00 +03:00 committed by danyaberezun
parent 302ef5dca1
commit 577d0e2d12
6 changed files with 72 additions and 45 deletions

View file

@ -7,9 +7,9 @@ RC = ../../src/rc.opt
check: $(TESTS)
$(TESTS): %: %.expr
@RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
# @cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
# @cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
clean:
rm -f *.log *.s *~ $(TESTS)

View file

@ -1,17 +0,0 @@
fun printString (x) {
for i:=0, i<x.length, i:=i+1 do
write (x[i])
od
}
n := read ();
x := "abcdefgh";
printString (x);
for i:=0, i<x.length, i:=i+1 do
x[i] := x[i]+2
od;
printString (x)