Schweitzer Fachinformationen
Wenn es um professionelles Wissen geht, ist Schweitzer Fachinformationen wegweisend. Kunden aus Recht und Beratung sowie Unternehmen, öffentliche Verwaltungen und Bibliotheken erhalten komplette Lösungen zum Beschaffen, Verwalten und Nutzen von digitalen und gedruckten Medien.
Language is a structured system of communication used by humans. When a human wishes to communicate with a computer system, a programming language is required. A programming language is able to convert a set of instructions, known as the source code, to perform a specific task. There are a number of common programming languages, such as C, C++, and JAVA. Each programming language requires a specific compiler, which is able to translate the source code into machine code. There are also other mechanisms to produce machine code that are interpreter-based, and these use step-by-step executors of the source code. A language can be implemented with either a compiler or interpreter. A combination of both platforms is possible too where the compiler generates the machine code and then passes it to the interpreter for execution [1].
Tcl stands for Tool Command Language. It is an interpreter-based scripting language, designed to be easy to embed into the application. A scripting language is a programming language that automates the execution of tasks. Scripts are written for the run time execution and are interpreted rather than compiled. Some popular scripting languages are Python, Ruby, Bash, Node Js, and Perl. Scripting languages are required in web applications, system administration, gaming, and plugin development for an existing system. Scripting languages are preferred owing to the (i) ease of learning, (ii) fast editing, (iii) interactivity, and (iv) functionality.
The shell script is a set of instructions in the specific programming language to be run by the UNIX shell, a command-line interpreter. Tcl (pronounced as tickle) is high-level, interpreted, dynamic programming. Tcl is very similar to the UNIX shell languages, namely Bounce, C, Korn, and Perl, and therefore offers a wide range of programmability [2]. Tcl supports a wide range of programming paradigms, like object-oriented programming, and the imperative and functional procedural styles offer the ability for applications to communicate with each other. It is possible to associate Tcl with the toolkit (Tk) used for building a graphical user interface (GUI). Tk is a cross-platform, which offers a wide range of widget libraries that can also be associated with other programming languages.
Tcl and the X-window toolkit were developed by Prof. John Ousterhout of U.C. Berkeley to solve the difficulty associated with a programming language. It was initially developed for UNIX, then ported to Windows, MAC, DOS, and QS/2. Its ability to integrate a Tcl interpreter with existing applications and to interact with the program set is what differentiates it from other programs. Table 1.1 presents a comparison between programming and scripting languages.
Table 1.1 Programming and scripting language comparison.
A Tcl application requires a Tcl interpreter and a text editor. Nomenclature and version of the editor would be different depending on the operating system. Vi is preferred for UNIX or LINUX systems and notepad for Windows as a .tcl file. A Tcl script development with a text editor must be saved with the extension .tcl, which is known as the source file. The interpreter enables us to execute the Tcl command line by line. The latest version of the Tcl installer for the Windows operating system can be downloaded from http://activestate.com. The latest stable version is tcl8.6.
There is a different mechanism to access the Tcl interpreter
Search ? tclsh
Figure 1.1 shows a command-line interpreter based on the Windows environment.
Figure 1.1 Command-line interpreter.
Search ? wish
Figure 1.2 Wish interpreter.
Wish, i.e., Windowing Shell, is a Tcl interpreter, as presented in Figure 1.2, embedded with Tk; the Tcl command is read from a standard text editor or notepad. The Tcl command can be edited in the console window and wish in a smaller window to display the Tk widget. Alternatively, users can interact via importing the source file into the interpreter. A set of Tcl commands edited with notepad saved with the .tcl extension can be imported into the console.
File ? Source ? locate the file ? open search ? tkcon
Figure 1.3 Tkcon interpreter.
The tkcon interface shown in Figure 1.3 is a replacement of the standard console with Tk. It provides a GUI while the Tk commands are used in the program. Users can enter the program using a standard text editor or can import a source file.
File ? Load file ? Locate the file ? Open
Tcl includes some special variables that present their usage (see Figure 1.4). The following is a list of the special variables [3].
tcl_library
tcl_version
tcl_patchLevel
tcl_interactive
tcl_precision
tcl_rcFileName
tcl_pkgPath
Argc
Argv
argv0
env (PATH)
Figure 1.4 Tcl special variable.
Tk is the most common extension of Tcl, and enables the creation and manipulation of the interface widgets. Advantages of the GUI design with command-line arguments are (i) faster development, (ii) a higher level of interface than other standard library toolkits, (iii) interface can be factorized with user application.
The following online platforms prove that an online interpreter does not need to be installed:
The following Tcl script displays a statement at the std. output [4]:
puts "Hello Tcl World"
Each line of the script can be terminated by a newline or semicolon (;). A script can be stopped from execution via commenting by adding a hash (#) at the beginning. Figure 1.5 displays a simple program to display.
Figure 1.5 Tcl simple program.
Tcl is a case-sensitive language. Identifiers are the names used to identify the variable (defined by the user). An identifier can start with an alphabetical letter (A-Z/a-z), underscore (_), or numeric digit (0-9). It avoids characters such as @ and %.
Examples: var., Var, St1, s_1, prog50.
Whitespace in Tcl is known as a blank statement and the interpreter ignores it. Whitespace describes the blank, newline, tab character, or comment. It separates one part of the statement from another.
There are several reasons a developer may prefer a Tcl scripting language. The following are the most favorable applications for the Tcl...
Dateiformat: ePUBKopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet – also für „fließenden” Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.