mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-26 13:49:18 +00:00
90 lines
1.5 KiB
Plaintext
90 lines
1.5 KiB
Plaintext
|
NEW
|
|||
|
PREFIX
|
|||
|
AUTO 4,1
|
|||
|
#!/bin/csh
|
|||
|
// This is a comment....
|
|||
|
|
|||
|
puts(argv[1]);
|
|||
|
|
|||
|
|
|||
|
exit
|
|||
|
|
|||
|
puts("puts: test 'const char *' string.");
|
|||
|
|
|||
|
struct tag_test {
|
|||
|
int cnt;
|
|||
|
float f;
|
|||
|
tag_test *next;
|
|||
|
};
|
|||
|
|
|||
|
long L1=3;
|
|||
|
long L2=5;
|
|||
|
long L3=7;
|
|||
|
printf("L1=%L, L2=%L, L3=%L\r\n", L1, L2, L3);
|
|||
|
|
|||
|
L3=L1*L2+1;
|
|||
|
printf("L3=L1*L2+1:L1=%L, L2=%L, L3=%L\r\n", L1, L2, L3);
|
|||
|
|
|||
|
L3=L1+5*9;
|
|||
|
printf("L3=L1+5*9:L1=%L, L2=%L, L3=%L\r\n", L1, L2, L3);
|
|||
|
|
|||
|
L3=(L1+5)*L2+10;
|
|||
|
printf("L3=(L1+5)*L2+10:L1=%L, L2=%L, L3=%L\r\n", L1, L2, L3);
|
|||
|
|
|||
|
#define PI 3.14159265
|
|||
|
|
|||
|
float f = PI / 3;
|
|||
|
printf("f=%e\r\n", f);
|
|||
|
|
|||
|
float COSPI3=cos(f);
|
|||
|
float SQR2=sqr(2);
|
|||
|
printf("cos(PI/3)=%e, sqr(2)=%e\r\n", COSPI3, SQR2);
|
|||
|
|
|||
|
printf("f=%e, COSPI3=%e\r\n", f, COSPI3);
|
|||
|
|
|||
|
int i = 36;
|
|||
|
i = i - 11;
|
|||
|
i=i<<4;
|
|||
|
printf("i=%I\r\n", i);
|
|||
|
|
|||
|
float BILLION=1000000000; //9E6E6B2800
|
|||
|
printf("BILLION=%e %h%h%h%h%h\r\n", BILLION, BILLION);
|
|||
|
unsigned int Test=61027;
|
|||
|
printf("Test=%D\r\n", Test);
|
|||
|
|
|||
|
float a = 66 / 3;
|
|||
|
printf("a=%e\r\n", a);
|
|||
|
a=a+1;
|
|||
|
printf("a=%e\r\n", a);
|
|||
|
float mul=256*128;
|
|||
|
printf("mul=%e\r\n", mul);
|
|||
|
|
|||
|
puts("Press a key");
|
|||
|
char chr = getchar();
|
|||
|
printf("chr=%d\r\n", chr);
|
|||
|
|
|||
|
int cnt=3;
|
|||
|
|
|||
|
if (cnt) {
|
|||
|
puts("IF block...");
|
|||
|
cnt=cnt+1;
|
|||
|
printf("cnt=%I\r\n", cnt);
|
|||
|
}
|
|||
|
|
|||
|
puts("Press a key");
|
|||
|
chr=getchar();
|
|||
|
|
|||
|
while (cnt) {
|
|||
|
cnt=cnt-1;
|
|||
|
printf("cnt=%5I, 0x%H\r\n", cnt, cnt);
|
|||
|
}
|
|||
|
|
|||
|
puts("Press a key");
|
|||
|
getchar();
|
|||
|
|
|||
|
if (0) {
|
|||
|
puts("false{{{{{SKIPTHIS");
|
|||
|
}
|
|||
|
MAN
|
|||
|
TEXT /MAKE/USR/SHARE/ctests/ctest
|