Skip to content

Commit

Permalink
move sample program to tests folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Luís Möllmann committed May 11, 2017
1 parent 0d37c7f commit 12a46c1
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions tests/sample_program.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// UFRGS - Compiladores - Marcelo Johann - 2017/1

a: short 0;
i: long 0;
v: long[10] 0 0 0 0 0 0 0 0 0 0;
mat: long[10];
f: float 10.55;
c: byte 'x';
d: byte 65;


long main()
{
a = 10;
v#2 = v[10-1];
for (i = 1 to 10)
print i " ";

print " Digite um numero: \n";
read i;
while (i<10)
{
a = incn(a,1);
i = i + 1;
a = (i + a + 1);
};
print "Incrementado algumas vezes fica " a "\n";
when (a==5) then
print "Parou no meio\n";
when (a==11) then
;
when (a==11) then else
;
;;;
{;};
{};
};

long incn (long x, long n)
return x+n;

short voidfunc() ;



0 comments on commit 12a46c1

Please sign in to comment.