1 #include <stdio.h> 2 #include "tpl.h" 3 main()4int main() { 5 tpl_node *tn; 6 double x=0.5,y=0.0; 7 8 tn = tpl_map("f",&x); 9 tpl_pack(tn,0); 10 printf("x is %f\n", x); 11 tpl_dump(tn,TPL_FILE,"/tmp/test45.tpl"); 12 tpl_free(tn); 13 14 tn = tpl_map("f",&y); 15 tpl_load(tn,TPL_FILE,"/tmp/test45.tpl"); 16 tpl_unpack(tn,0); 17 printf("y is %f\n", y); 18 tpl_free(tn); 19 return(0); 20 21 } 22