mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 05:32:20 +00:00
d8631337dd
LIBTUI.S.txt demo
48 lines
753 B
Plaintext
48 lines
753 B
Plaintext
NEW
|
||
AUTO 3,1
|
||
#include <stdio.h>
|
||
|
||
/* C-style comments....
|
||
...multi-lines */
|
||
|
||
#ifndef _TESTDEF_
|
||
|
||
int testdef;
|
||
#define _TESTDEF_ 1
|
||
|
||
#else
|
||
|
||
int testdef2;
|
||
#endif
|
||
|
||
int main(int argc, char *argv[])
|
||
{
|
||
puts("Press a key");
|
||
char c=getchar();
|
||
printf("char=%d\r\n", c);
|
||
if (c == 13)
|
||
{
|
||
puts("ENTER");
|
||
// C99 comments: skip LF
|
||
getchar();
|
||
}
|
||
else
|
||
if (c == 32)
|
||
{
|
||
puts("Not ENTER...but SPACE");
|
||
}
|
||
else
|
||
puts("Some other key...");
|
||
|
||
int i=0;
|
||
while (i++ < 10) {
|
||
if (i==5) continue;
|
||
printf("count1=%I\r\n", i);
|
||
}
|
||
do {
|
||
printf("count2=%I\r\n", i);
|
||
} while (i-- > 0);
|
||
}
|
||
MAN
|
||
TEXT root/ctest/testif.c
|