1
0
mirror of https://github.com/cc65/cc65.git synced 2024-10-31 20:06:11 +00:00
cc65/test/ref/ifexpr.c
2014-09-25 21:38:34 +02:00

37 lines
442 B
C

/*
!!DESCRIPTION!! if/then, ? operator, compares
!!ORIGIN!! cc65 devel list
!!LICENCE!! Public Domain
*/
#include <stdio.h>
#include <limits.h>
void t1a(void)
{
int a = -0x5000;
printf(a < 0x5000 ? "ok\n" : "error\n");
}
void t1b(void)
{
int a = -0x5000;
if(a<0x5000)
{
printf("ok\n");
}
else
{
printf("error\n");
}
}
int main(void)
{
t1a();t1b();
return 0;
}