Home > Programming > C Programming Language
C Programming and Tcl 44
Sort Desciption:C. 44. C Programming and Tcl. 44. This chapter explains how to extend a Tcl application with .... C Programming and Tcl Chap. 44. Calling Out to Tcl Scripts ...
Content Inside:C Programming and Tcl 44Page 1603CHAPTERVI.TclandC44C Programming and Tcl44This chapter explains how to extend a Tcl application with new builtincommands. Tcl 8.0 replaces the original stringbased command interfacewith a more efficient dualported object interface. This chapter describesboth interfaces.This chapter is from Practical Programming in Tcl and Tk 3rd Ed. 1999 Brent Welchhttp://www.beedub.com/book/Tclis implemented in a C library thatis easy to integrate into an existing application. By adding the Tcl interpreter toyour application you can configure and control it with Tcl scripts and with Tkyou can provide a nice graphical interface to it. This was the original model forTcl. Applications would be largely applicationspecific C code and include a smallamount of Tcl for configuration and the graphical interface. However the basicTcl shells proved so useful by themselves that relatively few Tcl programmersneed to worry about programming in C or C++.Tcl is designed to be easily extensible by writing new command implementations in C. A command implemented in C is more efficient than an equivalentTcl procedure. A more pressing reason to write C code is that it may not be possible to provide the same functionality purely in Tcl. Suppose you have a newdevice perhaps a color scanner or a unique input device. The programminginterface to that device is through a set of C procedures that initialize andmanipulate the state of the device. Without some work on your part that interface is not accessible to your Tcl scripts. You are in the same situation if you havea C or C++ library that implements some specialized function such as a database. Fortunately it is rather straightforward to provide a Tcl interface that corresponds to the C or C++ interface.Note: Where this chapter says "C" you can always think "C or C++". Thereis also a package called TclBlend that lets you extend Tcl by writing Java insteadof C and to e ...
Source: www.beedub.com
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Related Files
Programming in C C++ Java
Filed under: Programming and C Programming LanguageProgramming in C C++ Java. Course Overview. Object oriented programming languages are widely used for the development of complex software systems. ...
C Programming
Filed under: Programming and C Programming LanguageThe C Programming Language ANSI C. By Brian W. C. Kernighan & Dennis M. Ritchie. K and R. "Practical C programming". By Steve ...
An Overview of the C++ Programming Language
Filed under: Programming and C Programming LanguageThe C++ programming language provides a model of memory and computation that ... 3 The C Programming Model presents the C subset of C++ and other C++ ...
C Programming Fundamentals
Filed under: Programming and C Programming Language1 C Programming Fundamentals C is a compiled language. The user creates source code (often ... exe extension). Below is typical C program called LED.C that illustrates some fundamental C ...
Essential C
Filed under: Programming and C Programming LanguageC Programming Language (below) as part of their research at AT&T. Unix and C++ ... The C Programming Language 2nd ed. by Kernighan and Ritchie. ...
