]> git.sur5r.net Git - cc65/blob - test/ref/ifexpr.c
Only for jumps, the lib uses named asm labels in branches
[cc65] / test / ref / ifexpr.c
1 /*
2   !!DESCRIPTION!! if/then, ? operator, compares
3   !!ORIGIN!!      cc65 devel list
4   !!LICENCE!!     Public Domain
5 */
6
7 #include <stdio.h>
8 #include <limits.h>
9
10 void t1a(void)
11 {
12     int a = -0x5000;
13
14     printf(a < 0x5000 ? "ok\n" : "error\n");
15 }
16
17 void t1b(void)
18 {
19     int a = -0x5000;
20
21     if(a<0x5000)
22     {
23         printf("ok\n");
24     }
25     else
26     {
27         printf("error\n");
28     }
29 }
30
31 int main(void)
32 {
33     t1a();t1b();
34
35     return 0;
36 }