亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? rhl30.htm

?? linux的初學(xué)電子書
?? HTM
?? 第 1 頁 / 共 3 頁
字號(hào):
<HTML>

<HEAD>

<TITLE>Red Hat Linux Unleashed rhl30.htm </TITLE>

<LINK REL="ToC" HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm">

<LINK REL="Index" HREF="htindex.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/htindex.htm">

<LINK REL="Next" HREF="rhl31.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl31.htm">

<LINK REL="Previous" HREF="rhl29.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl29.htm"></HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">

<A NAME="I0"></A>

<H2>Red Hat Linux Unleashed rhl30.htm</H2>

<P ALIGN=LEFT>

<A HREF="rhl29.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl29.htm" TARGET="_self"><IMG SRC="purprev.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>

<A HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm" TARGET="_self"><IMG SRC="purtoc.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>

<A HREF="rhl31.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl31.htm" TARGET="_self"><IMG SRC="purnext.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purnext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>


<HR ALIGN=CENTER>

<P>

<UL>

<UL>

<UL>

<LI>

<A HREF="#E68E238" >What Is Tcl?</A>

<LI>

<A HREF="#E68E239" >What Is Tk?</A>

<LI>

<A HREF="#E68E240" >The Tcl Language</A>

<UL>

<LI>

<A HREF="#E69E364" >Tcl Variables and Variable Substitution</A>

<LI>

<A HREF="#E69E365" >Tcl Command Substitution</A>

<LI>

<A HREF="#E69E366" >Quotes</A>

<LI>

<A HREF="#E69E367" >The if Command</A>

<LI>

<A HREF="#E69E368" >The for Command</A>

<LI>

<A HREF="#E69E369" >The while Command</A>

<LI>

<A HREF="#E69E370" >The switch Command</A>

<LI>

<A HREF="#E69E371" >Comments</A></UL>

<LI>

<A HREF="#E68E241" >The Tk Language Extensions</A>

<UL>

<LI>

<A HREF="#E69E372" >Frames</A>

<LI>

<A HREF="#E69E373" >Buttons</A>

<LI>

<A HREF="#E69E374" >Menus and Menu Buttons</A>

<LI>

<A HREF="#E69E375" >List Boxes</A>

<LI>

<A HREF="#E69E376" >Scrollbars</A></UL>

<LI>

<A HREF="#E68E242" >Summary</A></UL></UL></UL>

<HR ALIGN=CENTER>

<A NAME="E66E30"></A>

<H1 ALIGN=CENTER>

<CENTER>

<FONT SIZE=6 COLOR="#FF0000"><B>30</B></FONT></CENTER></H1>

<BR>

<A NAME="E67E30"></A>

<H2 ALIGN=CENTER>

<CENTER>

<FONT SIZE=6 COLOR="#FF0000"><B>Introduction to Tcl and Tk</B></FONT></CENTER></H2>

<BR>

<P>This chapter introduces the Tcl programming language and its most popular extension, Tk. This chapter covers the following topics:

<BR>

<UL>

<LI>What Tcl is

<BR>

<BR>

<LI>What Tk is

<BR>

<BR>

<LI>The Tcl language

<BR>

<BR>

<LI>The Tk language extensions

<BR>

<BR>

</UL>

<P>By the end of this chapter, you should understand what Tcl and Tk are, and also how to write simple applications using Tcl and Tk.

<BR>

<BR>

<A NAME="E68E238"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>What Is Tcl?</B></FONT></CENTER></H3>

<BR>

<P>Tcl stands for Tool Command Language. (It is pronounced &quot;tickle.&quot;) It is a scripting language similar to the shell scripting languages introduced in <A HREF="rhl13.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl13.htm">Chapter 13</A>, &quot;Shell Programming.&quot; Tcl can be used to quickly 
write text-based application programs.

<BR>

<P>Tcl was developed by John Ousterhout, then of the University of California at Berkeley. Tcl is an interpreted language and therefore has the usual advantages and disadvantages of all interpreted languages. The key disadvantage of interpreted languages 
is that they execute much slower than compiled languages. The biggest advantage of interpreted languages is that developing applications using them is usually much faster than using compiled languages. This is because you don't have to wait for code to 
compile and can see any changes you make to the code almost instantly.

<BR>

<P>Tcl has a core set of built-in functions that provide the basic features of its programming language. The true power of Tcl, however, is that it is easily extendible. Application programmers can add functions to Tcl and can even imbed the Tcl function 
library directly into their applications. This gives programmers the power to include an interpretive scripting language directly in their own application without having to do any of the work of developing the language. This means that you can provide 
users of your application with all the commands that exist within Tcl and also any that you create and add to the Tcl library.

<BR>

<P>Invoking Tcl commands is done by starting up the Tcl shell, called tclsh. Once you have started tclsh, you can type Tcl commands directly into it. Straying slightly from the &quot;hello world&quot; example that you find in almost every introductory 
language text, the following example shows you how to write Hello there instead to the screen:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">puts stdout &quot;Hello there&quot;</FONT></PRE>

<P>This command contains three separate words. The first word in the command is the actual command name, puts. The puts command is an abbreviation for put string; it simply writes something to the device that is specified in the second word of the command. 
In this case the second word tells puts to write to the standard output device, which is typically the screen. The third word in the puts command is &quot;Hello there&quot;. The quotation marks tell Tcl to interpret everything contained within them as a 
single word.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>The default output device is stdout (standard output, usually the screen), so if you intend to write something to stdout using the puts command, the second argument is optional.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>Even though this is a very simple example, it illustrates the basic command syntax of the Tcl language. There are obviously many more commands contained within Tcl, but the basic syntax of all Tcl commands is the same:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">command parameter1 parameter2 ...</FONT></PRE>

<P>The command can be any of the built-in Tcl commands, or it can be a user-defined extension to the Tcl command set in the form of a Tcl procedure. In either case, the fundamental syntax remains unchanged.

<BR>

<BR>

<A NAME="E68E239"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>What Is Tk?</B></FONT></CENTER></H3>

<BR>

<P>Tk, which was also developed by Ousterhout, is a graphical user interface extension to Tcl. Tk is based on the X Window system and allows application developers to develop X Window-based applications much faster than they could using other X Window 
toolkits, such as Motif or OPEN LOOK.

<BR>

<P>Like Tcl, Tk also has a shell that enables you to enter commands to be interpreted. The Tk shell is a superset of the Tcl command shell. This means that anything you can do in the Tcl command shell you can also do in the Tk command shell. The big 
difference between the two is that the Tk command shell was designed to enable you to build X Window front ends to your applications.

<BR>

<P>The Tk command shell is called wish, which stands for windowing shell. You must be running X Window when you invoke wish. This is because when wish is invoked, it brings up a window to display the results of any of the graphical commands it interprets. 
When you invoke wish, a window should appear on your screen.

<BR>

<P>Let's try enhancing the earlier &quot;Hello there&quot; example by displaying Hello there in a button in the wish window. To accomplish this, you must first ensure that wish has been started. This is easily done by typing the following command into an 
Xterm window:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">wish</FONT></PRE>

<P>This command brings up the wish window and also executes the Tk interpreter in the Xterm window. You can now type Tcl or Tk commands directly in the Xterm window. The commands necessary to print Hello there in a button in the wish window are as follows:


<BR>

<PRE>

<FONT COLOR="#000080">button .b -text &quot;Hello there&quot; -command exit

pack .b</FONT></PRE>

<P>The syntax of the command on the first line contains the command name followed by a number of arguments. The first argument is the name you are giving to the new button. The rest of the arguments passed to the button command are slightly different from 
the arguments you saw in the Tcl version of the &quot;Hello there&quot; example. These arguments each consist of two parts. The first part tells Tk what the argument name is, and the second part tells Tk the value of the argument.

<BR>

<P>The second argument has the name text, and the value of the argument is the string you want to display in the button. The third argument has the name command and is used to specify the command that you want to execute when that button is pushed. In this 
example, you do not really want anything to happen if the button is pushed, so you just tell wish to exit from the current script.

<BR>

<P>The button command created a button widget that you called .b. To get the button to show up in the wish window, you must tell Tk to display the button. This is done by the pack command.

<BR>

<P>In this example, the pack command has only one argument: the name of the button that you created in the first command. When the pack command is executed, a button with the string Hello there displayed in it appears in the wish window.

<BR>

<P>Two things about this example are worth discussing in more detail. The first is why you called the button .b instead of b, bob, or button1. The significance is not the actual text in the button name (this in fact could be bob or button1), but the period 
(.) preceding the name of the button.

<BR>

<P>The period notation is used to represent the widget hierarchy. Each widget is contained in another widget. The root widget, or the highest level widget, is contained in the wish window and is called . (this is analogous to the Linux directory structure, 
in which each directory has an owner or a parent directory and the root or highest level directory is named /). Each time you create a new widget, you must tell Tk which widget the new widget should be contained in. In the &quot;Hello there&quot; example, 
the container specified for the button widget was ., the root widget.

<BR>

<P>The second item of interest is the resizing of the wish window that occurs after you enter the pack command. The wish window shrinks down to a size that is just large enough to hold the button you created. Tk causes the wish window to default to a size 
just large enough to hold whatever it has in it. Many commands can be used to change this behavior and customize how things are displayed on the screen. You will see some of these commands later in this chapter.

<BR>

<BR>

<A NAME="E68E240"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>The Tcl Language</B></FONT></CENTER></H3>

<BR>

<P>Now that you have seen examples of both Tcl and Tk in action, it is appropriate to take a step back and look at the underlying Tcl language in more detail. Tcl contains a rich set of programming commands that support all the features found in most 
high-level languages. This section discusses many of these features and gives examples that explain how to use them.

<BR>

<BR>

<A NAME="E69E364"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Tcl Variables and Variable Substitution</B></FONT></CENTER></H4>

<BR>

<P>Like the UNIX shell programming languages, Tcl supports the concept of variables. Variables are temporary storage places used to hold information that will be needed by a program at some later point in time. In Tcl, variable names can consist of any 
combination of printable characters.

<BR>

<P>Typically, variable names are meaningful names that describe the information being stored in them. For example, a variable that is being used to hold the monthly sales of a product might have one of the following names:

<BR>

<PRE>

<FONT COLOR="#000080">Monthly_sales

&quot;Monthly sales&quot;</FONT></PRE>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Quotation marks cause Tcl to ignore the whitespace characters (spaces and tabs) in the variable name and treat it as one word. This is discussed in the &quot;Quotes&quot; section of this chapter.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>The value that is placed into a variable can also be any combination of printable characters. Possible values for the Monthly_sales variable are

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产免费一区二区 | 亚洲精品国产精品乱码不99 | 国产精品资源在线| 91麻豆免费视频| 久久综合成人精品亚洲另类欧美 | 美女视频一区二区三区| 99久久精品国产毛片| 精品久久久三级丝袜| 一区二区三区免费观看| 国产白丝网站精品污在线入口| 精品视频1区2区| 亚洲精选视频免费看| 国产一区二区精品久久91| 91精品欧美综合在线观看最新 | 欧美日韩国产电影| 亚洲欧美激情插| 成人av免费在线| 国产日韩精品一区二区浪潮av| 午夜久久电影网| 欧美亚洲一区二区在线观看| 日韩美女啊v在线免费观看| 国产乱妇无码大片在线观看| 日韩欧美一级二级| 男男gaygay亚洲| 777欧美精品| 日韩国产欧美三级| 欧美一区二区三区视频免费| 偷拍日韩校园综合在线| 欧美偷拍一区二区| 亚洲福利电影网| 欧美日韩电影一区| 日韩中文字幕不卡| 欧美精品一级二级| 麻豆一区二区三| 欧美r级在线观看| 激情小说亚洲一区| 久久综合九色综合欧美就去吻| 激情文学综合插| 国产精品美女久久久久久久网站| 国产成人无遮挡在线视频| 国产亚洲1区2区3区| 国产超碰在线一区| 亚洲人123区| 欧美在线高清视频| 日本午夜精品一区二区三区电影 | 欧美日韩电影一区| 麻豆精品视频在线观看视频| 精品日本一线二线三线不卡| 国产一区二区0| 综合久久久久综合| 欧美日韩成人激情| 国产精品中文字幕日韩精品| 国产精品久久777777| 欧美三级乱人伦电影| 精品午夜久久福利影院| 国产日韩欧美不卡在线| 91黄视频在线观看| 久久se精品一区精品二区| 久久午夜色播影院免费高清| 99精品国产91久久久久久| 亚洲国产婷婷综合在线精品| 欧美成人一区二区三区| youjizz国产精品| 丝袜美腿成人在线| 中文字幕精品—区二区四季| 欧洲激情一区二区| 国产黑丝在线一区二区三区| 亚洲乱码国产乱码精品精小说| 4438x亚洲最大成人网| 粉嫩av亚洲一区二区图片| 亚洲午夜久久久久久久久电影网 | 精品视频在线免费看| 国产一区在线视频| 亚洲一区二区三区视频在线 | 欧美一级久久久| 99久久免费视频.com| 美腿丝袜亚洲色图| 自拍偷拍国产精品| 久久先锋影音av鲁色资源| 欧美群妇大交群的观看方式| 国产成人精品亚洲日本在线桃色 | 亚洲综合精品久久| 国产欧美日韩麻豆91| 4438x成人网最大色成网站| 99久久国产综合精品麻豆| 激情文学综合插| 蜜臀久久99精品久久久画质超高清| 亚洲视频免费观看| 中文字幕乱码日本亚洲一区二区| 欧美日韩综合不卡| 成人的网站免费观看| 精品中文字幕一区二区| 午夜精品福利在线| 亚洲黄色录像片| 欧美国产乱子伦| 久久久三级国产网站| 精品捆绑美女sm三区| 欧美电影一区二区三区| 欧美自拍丝袜亚洲| 91蝌蚪porny成人天涯| 成人免费视频国产在线观看| 精品一区二区三区av| 久久国产生活片100| 美女视频网站久久| 美女网站在线免费欧美精品| 首页综合国产亚洲丝袜| 亚洲成人免费在线| 亚洲成人第一页| 香蕉成人啪国产精品视频综合网| 亚洲欧美激情视频在线观看一区二区三区| 国产欧美日韩久久| 欧美激情一区二区| 国产精品区一区二区三区| 日本一二三不卡| 中文字幕亚洲不卡| 亚洲美女视频在线观看| 一区二区三区四区不卡在线| 亚洲精品欧美专区| 香蕉加勒比综合久久| 免费看日韩精品| 国模一区二区三区白浆| 高清不卡在线观看| 不卡欧美aaaaa| 91高清在线观看| 337p亚洲精品色噜噜狠狠| 日韩欧美一区二区视频| 亚洲精品在线免费观看视频| 久久久久综合网| 亚洲欧洲日产国码二区| 一区二区三区欧美视频| 五月天激情综合| 精品一区二区三区免费观看| 国产乱人伦精品一区二区在线观看| 国产精品一区二区在线观看网站 | 亚洲一区二区三区在线看| 亚洲超碰97人人做人人爱| 六月丁香婷婷久久| 国产成人在线电影| 在线视频国内一区二区| 欧美v日韩v国产v| 国产精品久久夜| 午夜精品在线看| 懂色av一区二区三区免费看| 在线观看欧美日本| 日韩精品一区二区三区视频在线观看| 久久久久国色av免费看影院| 亚洲人成伊人成综合网小说| 天堂蜜桃一区二区三区 | 麻豆精品久久精品色综合| 国产成人av电影免费在线观看| 色综合久久综合网97色综合| 欧美一级生活片| 亚洲精品自拍动漫在线| 精品影视av免费| 欧美私模裸体表演在线观看| 欧美精品一区二区三区四区| 一区二区三区资源| 国产一区激情在线| 欧美乱妇20p| 国产精品国产三级国产| 秋霞午夜鲁丝一区二区老狼| 成人91在线观看| 日韩写真欧美这视频| 亚洲精品久久久久久国产精华液| 麻豆免费看一区二区三区| 日本高清不卡视频| 久久久久88色偷偷免费| 亚瑟在线精品视频| 一本久久精品一区二区| 久久天堂av综合合色蜜桃网| 亚洲成人久久影院| 91在线porny国产在线看| 久久理论电影网| 毛片一区二区三区| 777久久久精品| 亚洲不卡一区二区三区| 91免费精品国自产拍在线不卡| 久久久国产精品不卡| 麻豆精品新av中文字幕| 欧美日韩综合一区| 亚洲午夜视频在线| 欧美性视频一区二区三区| 国产精品久久久久久久久免费桃花 | av午夜一区麻豆| av成人动漫在线观看| 久久先锋影音av| 激情文学综合网| 精品不卡在线视频| 日本aⅴ精品一区二区三区| 精品视频免费看| 性欧美大战久久久久久久久| 欧美午夜影院一区| 亚洲成人激情av| 欧美精品v国产精品v日韩精品| 亚洲精品久久久蜜桃| 欧美色偷偷大香| 亚洲v中文字幕| 91精品久久久久久蜜臀| 日韩精品一卡二卡三卡四卡无卡| 欧美又粗又大又爽|