All tricks in this blog are only for educational purpose. Learn these tricks only for your knowledge. Please donot try these to harm any one. We will not take any responsibility in any case. All softwares and tools on this site are here for private purposes only and If you want to use a software for business purpose, please purchase it. I do not host many of these tools. I Post links that I have found from numerous Search engines. I will not be responsible for any of harm you will do by using these tools.


Thursday, September 23, 2010

Integration between C language and high-level languages

The right language when you really needed it (Integration between C language and high-level languages) Software evaluation parameters Performance vs productivity Productivity vs quality Hardware compatibility vs performance The right language when you really needed it (Integration between C language and high-level languages) Productivity Illusions and smog-sellers Performance Wasteland Hardware requirements TCO Hardaware compatibility Hardware Abstract Layer System Libraries and language libraries Quality Documentation taboo The fast run to chaos Control process degree The possibility to have fast reactions Productivity vs quality How can I obtain more productivity? Using obscure tools to improve productivity deprives the possibility to provide a complete support Different languages for different philosophies Tcl/Tk Perl Perl/XS/C vs Tcl/C Different languages for different philosophies Object Oriented languages Lambda function languages Procedural languages Data driven languages Tcl/Tk Introduction to Tcl/Tk: Tcl programming examples:Multy platform structure (file join/file split …)Safe slave enviroments (interp)Basic Tk overview Tcl weakness: Coherency (list commands)Multitasking is performed just by thread Tcl strengths: Possibility to enhance the Tcl structures using TclTcl is easy and powerful Tcl is available for many different platforms Tcl and C: Tcl_Create Command #include #include int cProc (ClientData cd, Tcl_Interp *interp, int argc, CONST char* argv[]) {//// Questa funzione esegue un addizione fra “a” e “b”//int out=0, a=0, b=0, e=0;char outStr[20];if (argc != 3) {interp->result = “Error! Usage myAdd “;e=1;} else {if (Tcl_GetInt (interp, argv[1], &a) == TCL_OK && Tcl_GetInt (interp, argv[2], &b) == TCL_OK) {out=a+b;} else {interp->result = “Error!The parameters must be integer numbers”;e=1;}} if (e == 1) {return TCL_ERROR;} else {sprintf (outStr, “%d”, out);Tcl_SetResult (interp, outStr, TCL_VOLATILE);return TCL_OK;}}int Myadd_Init (Tcl_Interp *interp) {//// Questa funzione registra la procedura scritta in C//Tcl_Create Command (interp, “myAdd”, cProc, (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);if (Tcl_PkgProvide (interp, “my AddPkg”, “1.0″) != TCL_OK) {interp->result = “Error while I am registering the library”;return TCL_ERROR;}return TCL_OK;

Download Integration between C language and high-level languages.


Post a Comment