Tcl/Tk 8.5 Programming Cookbook
eBook - ePub

Tcl/Tk 8.5 Programming Cookbook

  1. 236 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Tcl/Tk 8.5 Programming Cookbook

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

With Tcl/Tk, you can create full-featured cross-platform applications in a simple and easy-to-understand way without any expensive development package; the only tools required are a simple text editor and your imagination. This practical cookbook will help you to efficiently interact with editors, debuggers, and shell type interactive programs using Tcl/Tk 8. This cookbook will comprehensively guide you through practical implementation of Tcl/Tk 8.5 commands and tools.

This book will take you through all the steps needed to become a productive programmer in Tcl/Tk 8. Right from guiding you through the basics to creating a stand-alone application, it provides complete explanation of all the steps along with handy tips and tricks.

The book begins with an introduction to the Tcl shell, syntax, variables, and programming best practices in the language. It then explores procedures and the flow of events with control constructs followed by advanced error trapping and recovery. From Chapter 4, a detailed study of string expressions and handling enables you to handle various string functions and use lists to expand the string functionality. The book then discusses in-depth the Tcl Dictionary and how to utilize it to store and retrieve data. File operations and Tk GUI handling are covered extensively along with a developing a real-world address book application to practice the concepts learned.

A practical, comprehensive cookbook to master the depths and breadths of Tcl/Tk 8.5 programming

Approach

This book provides a step-by-step approach to the Tcl/Tk language with the help of re-usable examples and images. It is a series of carefully organized, easy-to-follow, standalone recipes to solve your queries. Whether you go through the recipes chapter-wise or pick up any recipe randomly, you will find clear and complete explanation of the task covered in the recipe.

Who this book is for

If you are a beginner interested in adding Tcl/Tk 8.5 to your list of languages, or an experienced Tcl/Tk programmer looking to sharpen your knowledge, be assured, you will find your prefect guide in this book. Whether you are developing for your personal use or commercial applications, this book will provide you with a ready reference to the building blocks of Tcl/Tk 8.5

Frequently asked questions

Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Tcl/Tk 8.5 Programming Cookbook by Bert Wheeler in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Languages. We have over one million books available in our catalogue for you to explore.

Information

Year
2011
ISBN
9781849512985
Edition
1

Tcl/Tk 8.5 Programming Cookbook


Table of Contents

Copyright
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. The Tcl Shell
Introduction
The Tcl shell
Writing to the Tcl console
Getting ready
How to do itā€¦
How it worksā€¦
Mathematical expressions
Tcl expr operands
Mathematical functions
Computing mathematical expressions
Referencing files in Tcl
UNIX (UNIX, Linux and Mac OS X)
Windows
Variables
Basic variable commands
Getting Ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Unsetting a variable
Command line arguments
Launching a Tcl script
Getting Ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
2. Using the Building Blocks Control Constructs
Introduction
Controlling flow with the if statement
How to do itā€¦
How it worksā€¦
There's moreā€¦
Looping with for
How to do itā€¦
How it worksā€¦
Looping with foreach
How to do itā€¦
How it worksā€¦
Looping with while
How to do itā€¦
How it worksā€¦
Continuing a procedure
How to do itā€¦
How it worksā€¦
Breaking out of a procedure
How to do itā€¦
How it worksā€¦
Nested looping
How to do itā€¦
How it worksā€¦
There's moreā€¦
3. Error Handling
Introduction
Using the catch command
Getting ready
How to do itā€¦
How it worksā€¦
Using the eval command
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Using the error command
Getting ready
How to do itā€¦
How it worksā€¦
Error handling procedure
Getting ready
How to do itā€¦
How it worksā€¦
4. Handling String Expressions
Introduction
Appending to a string
How to do itā€¦
How it worksā€¦
Formatting a string
How to do itā€¦
How it worksā€¦
Matching a regular expression within a string
Getting ready
How to do itā€¦
How it worksā€¦
Performing character substitution on a string
How to do itā€¦
How it worksā€¦
Parsing a string using conversion specifiers
How to do itā€¦
How it worksā€¦
Determining the length of a string
How to do itā€¦
How it worksā€¦
Comparing strings
Getting ready
How to do itā€¦
How it worksā€¦
Comparing a string of characters
How to do itā€¦
How it worksā€¦
Locating the first instance of a character
How to do itā€¦
How it worksā€¦
Locating the index of a character
How to do itā€¦
How it worksā€¦
Determining the class of a string
How to do itā€¦
How it worksā€¦
Locating the last instance of a string
How to do itā€¦
How it worksā€¦
Determining the size of a string
How to do itā€¦
How it worksā€¦
Replacing values within a string
How to do itā€¦
How it worksā€¦
Locating a pattern within a string
How to do itā€¦
How it worksā€¦
Returning a range of characters from a string
How to do itā€¦
How it worksā€¦
Creating a string of repeated characters
How to do itā€¦
How it worksā€¦
Replacing ranges of characters contained within a string
How to do itā€¦
How it worksā€¦
Creating a reverse string
Getting ready
How to do itā€¦
How it worksā€¦
Converting a string to lowercase
How to do itā€¦
How it worksā€¦
Converting a string to title
How to do itā€¦
How it worksā€¦
Converting a string to uppercase
How to do itā€¦
How it worksā€¦
Trimming a string
How to do itā€¦
How it worksā€¦
Trimming leading whitespace
How to do itā€¦
How it worksā€¦
Trimming trailing whitespace
How to do itā€¦
How it worksā€¦
Locating the word end
How to do itā€¦
How it worksā€¦
Locating the word start
How to do itā€¦
How it worksā€¦
Performing variable substitution
How to do itā€¦
How it worksā€¦
5. Expanding String Functionality Using Lists
Introduction
Creating a list
How to do itā€¦
How it worksā€¦
There's moreā€¦
Joining two lists
How to do itā€¦
How it worksā€¦
There's moreā€¦
Joining list elements
How to do itā€¦
How it worksā€¦
There's moreā€¦
Appending list elements
How to do itā€¦
How it worksā€¦
Assigning list elements to variables
How to do itā€¦
How it worksā€¦
Retrieving an element from a list
How to do itā€¦
How it worksā€¦
Inserting elements into a list
How to...

Table of contents

  1. Tcl/Tk 8.5 Programming Cookbook