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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rhl30.htm

?? linux的初學電子書
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品欧美久久久久久动漫| 免费看精品久久片| 奇米精品一区二区三区在线观看一| 日韩av一区二区在线影视| 盗摄精品av一区二区三区| 色av成人天堂桃色av| 精品久久人人做人人爰| 亚洲一区欧美一区| 99久久综合精品| 26uuu亚洲| 日本aⅴ精品一区二区三区| 色天天综合色天天久久| 欧美激情资源网| 精品一二线国产| 欧美巨大另类极品videosbest | 国产91在线看| 日韩情涩欧美日韩视频| 亚洲福利视频导航| 欧洲av在线精品| 日韩美女视频19| av成人免费在线| 欧美激情一区二区三区全黄| 韩国v欧美v日本v亚洲v| 欧美一区二区三区四区高清| 亚洲电影你懂得| 欧美精品免费视频| 天天亚洲美女在线视频| 欧美日韩在线电影| 一区二区三区中文免费| 91麻豆福利精品推荐| 中文字幕一区二区三区四区| av在线播放一区二区三区| 欧美激情在线一区二区| 福利一区福利二区| 中文无字幕一区二区三区| 国产精品一卡二卡在线观看| 久久网这里都是精品| 国产美女视频91| 欧美激情综合在线| 色综合久久天天| 亚洲一区二区三区中文字幕| 欧美卡1卡2卡| 国产一区福利在线| 国产视频一区在线播放| 成人app软件下载大全免费| 亚洲天堂中文字幕| 欧美天天综合网| 捆绑变态av一区二区三区| 337p日本欧洲亚洲大胆精品| 国产精品白丝jk白祙喷水网站 | 日韩欧美成人激情| 国产一区二区91| 中文字幕在线一区免费| 在线亚洲人成电影网站色www| 亚洲一区电影777| 日韩三级精品电影久久久| 国产一区二区三区不卡在线观看| 日本一区二区三区久久久久久久久不 | 久久久久久久久蜜桃| 成人在线综合网| 亚洲国产中文字幕在线视频综合 | 精品一区二区三区蜜桃| 欧美草草影院在线视频| 国产1区2区3区精品美女| 亚洲欧美欧美一区二区三区| 欧美电影影音先锋| 国产风韵犹存在线视精品| 亚洲美女视频在线观看| 欧美岛国在线观看| 99视频精品全部免费在线| 亚洲电影你懂得| 国产日产欧产精品推荐色| 欧美亚洲国产一区二区三区| 国产一区二区在线视频| 亚洲国产wwwccc36天堂| 国产欧美视频在线观看| 欧美性xxxxxxxx| 豆国产96在线|亚洲| 五月婷婷综合网| 中文字幕一区二区三区在线不卡| 欧美久久一二区| 色综合色综合色综合色综合色综合| 日韩成人伦理电影在线观看| 国产精品久久久久久福利一牛影视 | 精品国产乱码久久| 欧美在线制服丝袜| 从欧美一区二区三区| 男人的天堂久久精品| 亚洲综合丁香婷婷六月香| 亚洲国产成人自拍| 精品美女一区二区| 欧美精选一区二区| 欧美主播一区二区三区| av中文字幕在线不卡| 久久97超碰色| 日韩精品电影在线观看| 亚洲精选视频免费看| 中文字幕不卡一区| 国产日韩一级二级三级| 日韩欧美国产一二三区| 欧美日韩精品高清| 欧美日韩国产影片| 欧美三级韩国三级日本一级| 99国产欧美另类久久久精品| 国产传媒久久文化传媒| 国产麻豆精品theporn| 久久国产视频网| 青娱乐精品视频| 伦理电影国产精品| 日本亚洲最大的色成网站www| 无码av免费一区二区三区试看| 一区av在线播放| 亚洲一二三级电影| 亚洲成人免费在线| 图片区小说区国产精品视频 | 亚洲日本韩国一区| 中文字幕一区二区三区不卡在线| 国产嫩草影院久久久久| 中文av一区二区| 国产精品国产三级国产三级人妇 | 97精品久久久午夜一区二区三区 | 日韩久久一区二区| 一区二区三区影院| 亚洲成在人线免费| 免费久久精品视频| 国产精品一区二区在线播放| 丁香五精品蜜臀久久久久99网站 | 欧美日韩成人一区| 欧美一卡二卡在线| 欧美变态tickle挠乳网站| 久久久五月婷婷| 一色桃子久久精品亚洲| 一区二区成人在线| 久久国产人妖系列| 丁香激情综合国产| 欧美色综合影院| 精品国产一区二区在线观看| 国产女人aaa级久久久级| 亚洲精品成人在线| 免费观看91视频大全| 国产成人午夜高潮毛片| 色8久久人人97超碰香蕉987| 欧美一二三四在线| 国产精品免费免费| 日韩精品欧美精品| 成人激情文学综合网| 欧美影视一区在线| 久久综合九色综合欧美98 | 日韩二区三区四区| 国产成人综合视频| 欧美日韩精品一区二区三区 | 成人欧美一区二区三区白人| 亚洲成人tv网| 成人在线视频一区| 欧美喷水一区二区| 国产三区在线成人av| 亚洲电影一级片| 成人美女视频在线观看| 欧美精品v日韩精品v韩国精品v| 精品国产乱码久久久久久夜甘婷婷 | 午夜av区久久| av一区二区三区| 精品国产伦一区二区三区观看体验 | 91极品视觉盛宴| 久久综合久久久久88| 亚洲成人免费看| 91色视频在线| 久久久影视传媒| 青青草91视频| 欧美亚一区二区| 国产精品美女久久久久高潮| 麻豆极品一区二区三区| 欧美三级日韩三级国产三级| 中文字幕不卡一区| 美脚の诱脚舐め脚责91 | 国产欧美日产一区| 久久se精品一区精品二区| 欧美日韩在线三级| 亚洲精品国产一区二区三区四区在线| 国产精品一区三区| 精品国产网站在线观看| 日欧美一区二区| 在线视频欧美精品| 一区精品在线播放| 成人动漫视频在线| 国产欧美日韩视频一区二区| 韩国女主播一区| 日韩久久久久久| 免费成人你懂的| 777xxx欧美| 爽好多水快深点欧美视频| 欧美视频自拍偷拍| 依依成人精品视频| av电影在线观看不卡| 国产精品少妇自拍| 成人激情午夜影院| 亚洲欧美日韩国产中文在线| 成人福利电影精品一区二区在线观看| 久久亚洲精华国产精华液| 精品一区二区在线观看|