2004-03-24 06:32:04 -08:00
|
|
|
#include "example.inc"
|
|
|
|
|
|
|
|
/* To compile:
|
|
|
|
* embryo_cc ./example.sma -oexample.amx
|
|
|
|
*
|
|
|
|
* To test run:
|
|
|
|
* embryo ./example.amx
|
|
|
|
*/
|
|
|
|
|
|
|
|
public global1 = 99;
|
|
|
|
public global2 = 77;
|
|
|
|
|
|
|
|
main()
|
|
|
|
{
|
2004-03-29 03:58:57 -08:00
|
|
|
new Float:t;
|
2004-03-24 06:32:04 -08:00
|
|
|
|
2004-03-29 03:58:57 -08:00
|
|
|
testfn(12345, "Panties!!!!", 7);
|
|
|
|
t = seconds();
|
|
|
|
printf("SECONDS = %f\n", t);
|
|
|
|
testdate();
|
2004-03-24 06:32:04 -08:00
|
|
|
return 77;
|
|
|
|
}
|
|
|
|
|
2004-03-29 03:58:57 -08:00
|
|
|
testdate()
|
|
|
|
{
|
|
|
|
new year, month, day, yearday, weekday, hour, minute;
|
|
|
|
new Float:second;
|
|
|
|
|
|
|
|
date(year, month, day, yearday, weekday, hour, minute, second);
|
|
|
|
printf("%i/%i/%i\n", day, month, year);
|
|
|
|
printf("%i:%i:%f\n", hour, minute, second);
|
|
|
|
printf("yearday: %i, weekday: %i\n", yearday, weekday);
|
|
|
|
printf("frand: %f\n", randf());
|
|
|
|
printf("rand: %X\n", rand());
|
|
|
|
}
|
|
|
|
|
2004-03-24 06:32:04 -08:00
|
|
|
tester(arg1=0, str[]="", arg2=0)
|
|
|
|
{
|
|
|
|
if (arg1 == 7) printf("arg1 == 7!!!\n");
|
|
|
|
printf(" TESTER: arg1=%i str='%s' arg2=%i\n", arg1, str, arg2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public testfn(arg1, str[], arg2)
|
|
|
|
{
|
|
|
|
new a = 10;
|
|
|
|
new Float:b = 20.0;
|
|
|
|
|
|
|
|
printf("arg1=%i str='%s' arg2=%i\n", arg1, str, arg2);
|
|
|
|
|
|
|
|
printf("float test %i %f\n", a, b);
|
|
|
|
|
|
|
|
tester(77, "blahdieblah", 1024);
|
|
|
|
if (arg1 == 7) printf("arg1 == 7!!!\n");
|
|
|
|
|
|
|
|
return 5;
|
|
|
|
}
|
|
|
|
|