Tcl_1_2015.00_LG_03 S公司2015年tcl教程Lab guide

阅读: 评论:0

Play with Strings
3
and Lists
Play with Strings and Lists Lab 3-1
Lab 3
Lab 3-2 Play with Strings and Lists
The Power of Tcl 1: Becoming a Proficient Tcl User
Lab Overview
During this lab, you will build a broad and useful command repertoire for manipulating strings and lists.
Answers & Solutions
This lab guide contains answers and solutions to all questions.  If you need help answering a question or would like to confirm your results, check the back portion of this document.
Lab Tasks
Create a useful command while applying
金膜the commands learned in lecture
LAB 2
Learn skills that will be essential every
time you write Tcl scripts
LAB 3
Master the commands to count patterns in strings, and gain comfort with the basic
components of a Tcl script
LAB 1
Lab 3 File Locations
Directory Structure
design_data ORCA netlist
scripts Constraint and run scripts
libs Technology libraries
tcl_procs Tcl procedures and solutions
.synopsys_pt.setup PrimeTime setup file
.
超导空调
synopsys_dc.setup Design Compiler setup file
Relevant Files
scripts/
l Incomplete TNV command
tcl_procs/
l Full TNV solution for homework
l              Solution for Q25 in Task 5
l              Solution for Q26 in Task 5
Play with Strings and Lists Lab 3-3 The Power of Tcl 1: Becoming a Proficient Tcl User
Lab 3
Lab Instructions
Task 1.Playing With Tcl Strings
Before applying strings to real world examples, you will go through some basic
examples to gain an understanding of what strings are all about.
The skills learned will be useful in the future whenever you explore new Tcl
commands or forget how to use commands you learned in the past.
1.Invoke either Design Compiler or PrimeTime.
There is no need to read a design for the following exercises.
pgd678
All subsequent instructions are generic for either tool - Design
Compiler or PrimeTime.
1.Create two strings by executing the following commands.
2.Use the command regexp –all to count patterns in a string.
Question 1. How many letter l’s are in the string captured by variable a
(you should get 3)?
....................................................................................................
Question 2. How many newlines in the string captured by variable b (you
should get 2)?
.
................................................................................................... Lab 3-4 Play with Strings and Lists
The Power of Tcl 1: Becoming a Proficient Tcl User
电玉粉Lab 3
3.Count the total number of characters in a string using the command string
length.  Execute the following example.
Question 3. Did the above exercise confirm that spaces and newlines
count as individual characters in strings?
....................................................................................................
4.Determine if a string matches a pattern using globbing and the command
string match.
导电膜For string matching to succeed (i.e. the return value is 1), the pattern and the
string must be identical except that the pattern may include wildcard
characters such as *.
Question 4. Did the above commands work as expected?
雨水流井....................................................................................................
5.Extract characters from a string using the command string index.
Question 5. Does the index range start at 1 or 0 (i.e. to get the first
character in a string, do you use an index of 1 or 0)?
....................................................................................................
Question 6. Do you need to know the total number of characters in a
string to extract the LAST character of the string?
.................................................................................................... Play with Strings and Lists Lab 3-5 The Power of Tcl 1: Becoming a Proficient Tcl User

本文发布于:2023-06-22 22:21:11,感谢您对本站的认可!

本文链接:https://patent.en369.cn/patent/3/148990.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:超导   雨水   空调   流井
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 369专利查询检索平台 豫ICP备2021025688号-20 网站地图