00001 #include <stdio.h>
00002 #include "boron.h"
00003
00004
00005 CFUNC(printHello)
00006 {
00007 int i;
00008 int count = ur_is(a1, UT_INT) ? ur_int(a1) : 1;
00009 (void) ut;
00010
00011 for( i = 0; i < count; ++i )
00012 printf( "Hello World\n" );
00013
00014 ur_setId(res, UT_UNSET);
00015 return UR_OK;
00016 }
00017
00018
00019 int main()
00020 {
00021 UThread* ut = boron_makeEnv( 0, 0 );
00022 if( ! ut )
00023 return 255;
00024
00025 boron_addCFunc( ut, printHello, "hello n" );
00026 boron_doCStr( ut, "hello 3", -1 );
00027 boron_freeEnv( ut );
00028 return 0;
00029 }