TCL TK 语言8.5编程指导

上传者: 45020956 | 上传时间: 2022-05-02 16:50:11 | 文件大小: 1.73MB | 文件类型: PDF
VIVADO经常使用TCL脚本对FPGA进行调试,通过JTAG转AXI对内部模块进行控制,但是TCL语言书籍比较少,这边是一个英文的TCL语言学习书籍. Preface 1 Chapter 1: The Tcl Shell 5 Introduction 5 The Tcl shell 6 Writing to the Tcl console 7 Mathematical expressions 8 Tcl expr operands 8 Mathematical functions 11 Computing mathematical expressions 12 Referencing files in Tcl 13 Variables 15 Command line arguments 17 Chapter 2: Using the Building Blocks Control Constructs 21 Introduction 21 Controlling flow with the if statement 23 Looping with for 24 Looping with foreach 25 Looping with while 26 Continuing a procedure 27 Breaking out of a procedure 28 Nested looping 29 Chapter 3: Error Handling 31 Introduction 31 Using the catch command 32 Using the eval command 34 Using the error command 35 Error handling procedure 36 Chapter 4: Handling String Expressions 39 Introduction 40 Appending to a string 41 Formatting a string 42 Matching a regular expression within a string 44 Performing character substitution on a string 46 Parsing a string using conversion specifiers 47 Determining the length of a string 49 Comparing strings 50 Comparing a string of characters 51 Locating the first instance of a character 52 Locating the index of a character 53 Determining the class of a string 54 Locating the last instance of a string 56 Determining the size of a string 57 Replacing values within a string 57 Locating a pattern within a string 58 Returning a range of characters from a string 59 Creating a string of repeated characters 60 Replacing ranges of characters contained within a string 60 Creating a reverse string 61 Converting a string to lowercase 62 Converting a string to title 62 Converting a string to uppercase 63 Trimming a string 64 Trimming leading whitespace 64 Trimming trailing whitespace 65 Locating the word end 65 Locating the word start 66 Performing variable substitution 67 Chapter 5: Expanding String Functionality Using Lists 69 Introduction 70 Creating a list 70 Joining two lists 71 Joining list elements 72 Appending list elements 73 Assigning list elements to variables 73 Retrieving an element from a list 74 Inserting elements into a list 75 Determining the number of elements 75 Getting a list element 76 Repeating elements 77 Replacing elements 77 Reversing elements 78 Searching a list 79 Editing a list 81 Sorting a list 82 Splitting a string into a list 83 Chapter 6: The Tcl Dictionary 85 Introduction 85 Creating a dictionary 86 Appending to a dictionary 87 Determining if a key exists 88 Filtering a dictionary 88 Searching a dictionary 90 Getting a record 91 Incrementing a value 91 Getting the dictionary structure 92 Getting a list of keys 93 Appending to an existing record 94 Merging two dictionaries 94 Creating a blank dictionary structure 95 Updating variables from a dictionary 96 Determining the size of a dictionary 96 Getting all records 97 Assigning values 97 Chapter 7: File Operations 99 Introduction 99 Opening a file 100 Configuring a file 102 Opening a command pipeline 104 Writing a file 106 Reading a file 106 Closing a file 107 File handling 108 Chapter 8: Tk GUI Programming with Tcl/Tk 111 Introduction 111 Creating a widget 113 Writing to the console 115 Setting the attributes of the window through window manager 116 Creating an additional window 117 Destroying a window 119 Creating a custom dialog 121 Chapter 9: Configuring and Controlling Tk Widgets 123 Introduction 123 Creating a frame widget 124 Creating a label widget 126 Creating an entry widget 128 Creating a button widget 130 Creating a listbox widget 133 Creating an image 139 Creating a simple form 140 Chapter 10: Geometry Management 143 Introduction 143 Controlling layout with the pack command 144 Controlling layout with the grid command 147 Combining pack and grid 151 Creating an address book interface 152 Chapter 11: Using Tcl Built-in Dialog Windows 157 Introduction 157 Displaying a message box 158 Displaying a confirmation dialog 159 Displaying the color picker 161 Displaying the directory dialog 162 Displaying the file selection dialog 164 Selecting a directory and file 166 Chapter 12: Creating and Managing Menus 169 Introduction 169 Creating a menu 170 Adding menu buttons 175 Displaying a pop-up menu 178 Data entry application 180 Chapter 13: Creating the Address Book Application 183 Introduction 183 Creating the Address Book application 184 Adding a record 188 Navigating records 191 Deleting a record 192 Finding a record 195 Full listing 196

文件下载

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明