[Handel-C]Interface with C

Feb 17, 2006 1 Replies

Hi all. I have to import a text file in my handel-C source code. The content of the file .txt is an integer. To import the text file, without using chanin and extern keywords, I thought to create a file in C language as follows:


/* c_file.c */ #include unsigned int test() { unsigned int x; FILE *fp; fp=fopen("test.txt","r"); x=getc(fp); fclose(fp); return x; }

Hi all. I have to import a text file in my handel-C source code. The content of the file .txt is an integer. To import the text file, without using chanin and extern keywords, I thought to create a file in C language as follows:

/* c_file.c */ #include unsigned int test() { unsigned int x; FILE *fp; fp=fopen("test.txt","r"); x=getc(fp); fclose(fp); return x; }

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required