next up previous
Next: Adding New Elements To Up: Internal Design Previous: Format Compilation

Format Execution

The process of ``execution'' of the compiled list of elements is rather simple. It has to step through the entire list of elements and check the type of each element on the list.

If the type is PTYPE, the value pointed to by the ptr pointer is copied on the output using the format in the Fmt field of the element.

If the type is FTYPE, it makes a call to the function pointed to by the func field, with Name, tt fargv, and fargc as the arguments. The value returned by this function is then copied to the output using the format in the Fmt field.

If the type is CHARType, the first character of the Name field is copied on the output.

If the output in required in the binary format, one can write an equivalent Execute routine, which will ignore the Fmt field and CHARType elements and output the values in the the binary format. Such a routine is used when the extracted data is directly passed on to a plotting program.



Sanjay Bhatnagar
Thu Jan 23 23:40:05 MST 1997