Top Content Up Prec

3. One little example

Next

here is a little code snippet to get started.


#include <stdio.h>

<mod>
int main (int argc, char *argv[])
{
	<glocal>
	int count;
	</glocal>
	glocal.count = 0;
	<call loadfile>("/tmp/file",true);
		<f oneline>
			glocal.count++;
		</f>
		<f empty>
			printf ("The file is empty\n");
		</f>
	</call>
	return 0;
}
</mod>

One little example

This little program counts the number of lines in a text file and print a message if the file is empty.
Top Content Up Prec

Next
Table of content
One big HTML document