New PDF release: Tcl Tk 8.5 Programming Cookbook

By Bert Wheeler

ISBN-10: 1849512981

ISBN-13: 9781849512985

This ebook offers a step by step method of the Tcl/Tk language with assistance from re-usable examples and pictures. it's a sequence of rigorously prepared, easy-to-follow, standalone recipes to unravel your queries. even if you wade through the recipes chapter-wise or choose up any recipe randomly, you can find transparent and whole rationalization of the duty lined within the recipe. while you are a newbie attracted to including Tcl/Tk 8.5 for your checklist of languages, or an skilled Tcl/Tk programmer seeking to sharpen your wisdom, be guaranteed, you'll find your prefect consultant during this ebook. even if you're constructing on your own use or advertisement purposes, this ebook gives you a prepared connection with the construction blocks of Tcl/Tk eight.

Show description

Read Online or Download Tcl Tk 8.5 Programming Cookbook PDF

Similar programming: programming languages books

Download e-book for iPad: Thinking in Java (3rd Edition) (One-Off) by Bruce Eckel

I do not like desktop books that deal with you're keen on a child: you want to wade through chapters and chapters sooner than the writer begins difficult you. now not this one. TIJ reads like a talk, strikes quickly and is often extraordinary you with attention-grabbing programming snippets. Its truly loads of enjoyable to learn and difficult to place down!

Download e-book for iPad: SCJP 100 Success Secrets: Success with The Sun Certified by Gerard Blokdijk

Addresses the head a hundred consultancy & schooling discussion board questions, with advice & luck components on investigating, comparing, achieving & capitalising on sunlight qualified Java Programmer (SCJP) IT certification.

Additional resources for Tcl Tk 8.5 Programming Cookbook

Sample text

The switches are as listed next: Switch -all Description Causes the command to perform substitution for each match found The & and \n sequences are handled for each substitution -expanded Allows use of expanded regular expression wherein whitespace and comments are ignored -line Enables newline-sensitive matching similar to passing the –linestop and –lineanchor switches -linestop Changes the behavior of [^] bracket expressions so that they stop at newline characters -lineanchor Changes the behavior of ^ and $ (anchors) so that they match both the beginning and end of a line -nocase Treats uppercase characters in the search string as lowercase -start Allows specification of a character offset in the string from which to start matching Now that we have a background in switches as they apply to the regsub command, let's look at the command: regsub switches expression string substitution variable The regsub command matches the expression against the string provided and either copies the string to the variable or returns the string if a variable is not provided.

Or ... Regardless of error the script continues. % In this instance, the script was unable to double the value of bad_data. Please note that the error message not only indicates an error, but also suggests the acceptable values to correct the problem. Using the eval command The eval command accepts one or more arguments that, when combined, create a Tcl script. When invoked, it passes the stored script to the command interpreter and behaves as a normal command, returning the values or errors that may have resulted.

32 Chapter 3 Getting ready To complete the following example, we will need to create a Tcl script file in your working directory. Open the text editor of your choice and follow the instructions given next. How to do it… In the following example, we will prompt the user for a numeric value to be doubled. If an incorrect value is provided, the script will generate an error. tcl Enter a number: 2 2 doubled is: 4 Regardless of error the script continues How it works… As you can see the script accepted the numeric value of 2 and processed it successfully.

Download PDF sample

Tcl Tk 8.5 Programming Cookbook by Bert Wheeler


by James
4.2

Rated 4.89 of 5 – based on 23 votes