Top Content Up
Prec

4.2 f

Next

The f tag is the key to the TLMP language. It associates some code (your code) with a functag. A component does a job and calls logicial functions (functags). The "f" tag supply the implementation of the logical function for a given context. The previous example could be expanded a bit. Say we have a file called "index" containing references to other files. The "loadfile" component knows about file "index" format and knows about other file reference. But it is clueless about the content of those files. It turns out those file are sub-index, so share the same content format as the file index, so the "loadfile" component is reused, with a different context.
<call loadfile>("index",true);
	<f oneline>
		<call loadfile>(line,true);
			<f oneline>
				printf ("sub-index: %s\n",line);
			</f>
		</call>
	</f>
</call>

Using the f tag

Combined with glocal variables (see below), one may start to understand TLMP a little more. Achieving such an imbricated use of a component using other programming technique (objects or function pointers) is a real pain.
Top Content Up
Prec

Next
Table of content
One big HTML document