TCL Ece720spr13 - 18
TCL Ece720spr13 - 18
TCL Ece720spr13 - 18
Lecture 18:
Tcl Scripting
Spring 2013
W. Rhett Davis
NC State University
Tcl Scripting
% set numdays(March) 31
31
% set numdays(February) 28
28
% puts "February has $numdays(February) days"
February has 28 days
% array names numdays
February March
interp = Tcl_CreateInterp();
code = Tcl_EvalFile(interp, argv[1]);
if (code != TCL_OK) {
printf("%s\n", Tcl_GetStringResult(interp));
exit(1);
}
exit(0);
}
Tcl Scripting