A2osX/ROOT/ctest/testargs.c.txt
burniouf c4ca3e5907 CC:BugFix in while
LIBTUI:Improved TBOX control (wip)
GOPHER:....to test hyperlinks in TBOX control (wip)
2023-01-31 07:55:01 +01:00

62 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
#include <stdio.h>
int testf4(int, int);
int testf1() {
puts("testf1 called!");
int r = 1029;
if (r == 1029) {
printf("testf1 will return %D...\r\n", r);
}
return r;
}
int testf2() {
puts("testf2 called!");
return 1000;
}
void testf3(char *msg)
{
puts(msg);
return; //not required just for testing
}
int testf4(int arg1, int arg2) {
printf("arg1=%D, arg2=%D\r\n", arg1, arg2);
return arg1 + arg2;
}
int i;
// unreachable code
printf("i=%D\r\n", i);
int main(int argc, char *argv[]) {
int r=testf1();
printf("testf1() returned %D\r\n", r);
getchar();
r=testf2();
printf("testf2() returned %D\r\n", r);
getchar();
testf3("testf3() void function...");
getchar();
i = testf4(34, 43);
printf("testf4() returned %D\r\n", i);
printf("main() argc=%D\r\n", argc);
getchar();
for(int i=0; i<=argc; i++) printf(" argv[%D]=%s\r\n", i, argv[i]);
printf("i = %D\r\n", i);
puts("set main() return code=0x73");
return 115; // return E_INUM
}
MAN
TEXT root/ctest/testargs.c