1. Using tags
2. Tag list
3. One little example
4. Tag definition
4.1 call
4.2 f
4.3 glocal
4.3.1 Using nested glocals
4.4 mod
4.5 obj
5. Creating components
5.1 Definition
5.2 Implementation
5.3 Taking advantage of the C++ implementation
5.4 Calling functags
5.5 Extending the functor classes
5.6 Adding content to the functor
5.7 Grabbing the functor address
Top Up

4.3.1 Using nested glocals

Next

the "glocal" tag may be used either at the start of a module or at the start of any "f" tag. Unfortunatly, for now, glocal nesting is not transparent. In the following example we want to create a complete /tmp/output file and one output file per file reference by the index.
<glocal>
	FILE *full;
</glocal>
glocal.full = fopen ("/tmp/output","w");
<call loadfile>("index",true);
	<f oneline>
		<glocal>
			FILE *fout;
		</glocal>
		char path[PATH_MAX];
		sprintf (path,"/tmp/output.%s",line);
		glocal.fout = fopen (path,"w");
		<call loadfile>(line,true);
			<f oneline>
				fprintf (glocal.fout,"oneline: %s\n",line);
				fprintf (glocal.glocal.full,"oneline: %s\n",line);
			</f>
		</call>
	</f>
</call>

Using nested glocals

We reference the variable "full" as glocal.glocal.full, showing the glocal nesting.
Top Up

Next
One big HTML document