[Handel-C]Interface with C

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;
}
Reply to
Rob
Loading thread data ...

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;
}
Reply to
Roberto

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.