comparison python/testc3.py @ 166:da0087b82fbe

Improved type checking
author Windel Bouwman
date Fri, 22 Mar 2013 16:15:31 +0100
parents 598d3888a11c
children 0b5b2ee6b435
comparison
equal deleted inserted replaced
165:598d3888a11c 166:da0087b82fbe
5 5
6 var u32 c, d; 6 var u32 c, d;
7 var double e; 7 var double e;
8 var int f; 8 var int f;
9 9
10 const int A = 1337; 10 const int A = 1337.;
11 11
12 function void test1() 12 function void test1()
13 { 13 {
14 var u32 bdd; 14 var u32 bdd;
15 var int a = 10; 15 var int a = 10;
31 } 31 }
32 32
33 function int t2(u32 a, u32 b) 33 function int t2(u32 a, u32 b)
34 { 34 {
35 if (a > 0) 35 if (a > 0)
36 {
37 a = 2 + t2(a - 1);
38 }
39
40 return a + b;
41 }
42
43 function int t3(int aap, int blah)
44 {
45 if (a > blah and blah < 45 + 33 or 33 > aap or 6 and true)
36 { 46 {
37 a = 2 + t2(a - 1); 47 a = 2 + t2(a - 1);
38 } 48 }
39 49
40 return a + b; 50 return a + b;