added LOGWARNING
[bosc.git] / simple / constexp.bos
blobfdd4d8a7959c8758ea834f35251cbe5947dcfe27
1 static-var x = 10*9/3+1;   // 31
3 Function()
5         var y;
6         x = 1<<16;      // 65536
7         256 | 1;        // 257
8         256 & 1;        // 0
9         {
10                 y = 25+x*5*3/3; // 25+x*5
11                 y = 25+x*(5*3/3); // 25+x*5
12                 y = 3*5/3*x+25; // 5*x+25
13                 y = x*2*2*2*2*2; // x*32
14                 y = x/2*2/2*2/2*2; // x*1
15                 y = x+2-2+2-2+2-2; // x+0
16                 y = x-2+2-2+2-2+2; // x+0
17                 y = x+2+(-2)+2+(-2)+2+(-2); // x+0
18                 y = x+(2-2+2-2+2-2); // x+0
19                 y = 2*3*x*4*5;  // 6*x*20
20         }
21         !10;            // 0
22         !!10;           // 1
23         ~257;           //-258
24         ~~257;          // 257
25         x = [15-4];     // lots
26         [1-0.5+x];      // const*(0.5+x)
27         <(1-0.5+x)>;    // const*(0.5+x)
28         (1 | 2 ^ 4 | 8) & 31;  // 15
29         1 || 2 || 4 || 8; // 1
30         1 && 2 && 4 && 8; // 1
31         0 && 1 && 2 && 4; // 0