11.07.2015 Views

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

468 TclHaylor, Phil. <strong>Computer</strong> Storage: A Manager’s Guide. Victoria, B.C.,Canada: Trafford, 2005.Scapicchio, Mark. “How Tape Drives Work: Tape Backup Still aGood Option.” Smart Computing, October 2002, pp. 69–72.Available online. URL: http://www.smartcomputing.com/editorial/article.asp?article=articles/archive/r0608/13 r08/13r08.asp&guid=. Accessed August 22, 2007.White, Ron, <strong>and</strong> Timothy Edward Downs. How <strong>Computer</strong>s Work.8th ed. Indianapolis: Que, 2005.TclDeveloped by John Ousterhout in 1988, Tcl (Tool comm<strong>and</strong>language) is used for scripting, prototyping, testing interfaces,<strong>and</strong> embedding in applications (see scripting languages).Tcl has an unusually simple <strong>and</strong> consistent syntax. Ascript is simply a series <strong>of</strong> comm<strong>and</strong>s (either built in or userdefined) <strong>and</strong> their arguments (parameters). A comm<strong>and</strong>itself can be an argument to another comm<strong>and</strong>, creating theequivalent <strong>of</strong> a function call in other languages.For example, setting the value <strong>of</strong> a variable uses the setcomm<strong>and</strong>:set total 0The value <strong>of</strong> the variable can now be referenced as$total.Control structures are simply comm<strong>and</strong>s that run othercomm<strong>and</strong>s. A while loop, for example, consists <strong>of</strong> a comm<strong>and</strong>or expression that performs a comparison, followedby a series <strong>of</strong> comm<strong>and</strong>s to be executed each time it returns“true”:while { MoreInFile } {GetDataDisplayData}In practice, many <strong>of</strong> the comm<strong>and</strong>s used are utilitiesfrom the operating system, usually UNIX or Linux. Tclalso includes a number <strong>of</strong> useful data structures such asassociative arrays, which consist <strong>of</strong> pairs <strong>of</strong> data itemssuch as:set abbr (California)Extensions <strong>and</strong> ApplicationsTcl includes a number <strong>of</strong> extensions that, for example,provide access to popular database formats such as MySQL<strong>and</strong> can interface with other programming languages suchas C++ <strong>and</strong> Java. The most widely used extension is Tk,which provides a library for creating user interfaces for avariety <strong>of</strong> operating systems <strong>and</strong> languages such as Perl,Python, <strong>and</strong> Ruby.Tcl has been described as a “glue” to connect existingapplications. It is relatively easy to write <strong>and</strong> test a scriptinteractively (<strong>of</strong>ten at the comm<strong>and</strong> line), <strong>and</strong> then insert itinto the code <strong>of</strong> an application. When the application runs,the Tcl interpreter runs the script, whose output can thenbe used by the main application (see interpreter).CAFurther ReadingFoster-Johnson, Eric. Graphical Applications with Tcl & Tk. 2nd ed.New York: Hungry Minds, 1997.Wall, Kurt. Tcl <strong>and</strong> Tk Programming for the Absolute Beginner. Boston:Course <strong>Technology</strong>, 2007.Welch, Brent B., <strong>and</strong> Ken Jones. Practical Programming in Tcl <strong>and</strong>Tk. 4th ed. Upper Saddle River, N.J.: Prentice Hall, 2003.TCP/IPContrary to popular perception, the Internet is not e-mail,chat rooms, or even the World Wide Web. It is a system bywhich computers connected to various kinds <strong>of</strong> networks<strong>and</strong> with different kinds <strong>of</strong> hardware can exchange dataaccording to agreed rules, or protocols. All the applicationsmentioned (<strong>and</strong> many others) then use this infrastructureto communicate.TCP/IP (Transmission Control Protocol/Internet Protocol)provides the rules for transmitting data on the Internet.It consists <strong>of</strong> two parts. The IP (Internet Protocol) routespackets <strong>of</strong> data. The header information also includes:• The total length <strong>of</strong> the packet. In theory packets canbe as large as 65 kbytes; in practice they are limited toa smaller maximum.• An identification number that can be used if a packetis broken into smaller pieces for efficiency in transmission.This allows the packet to be reassembled atthe destination.• A “time to live” value that specifies how many hops(movements from one intermediate host to another)the packet will be allowed to take. This is reduced by1 for each hop. If it reaches 0, the packet is assumedto have gotten “lost” or stale, <strong>and</strong> is discarded.• A protocol number (the protocol is usually TCP, seebelow).• A checksum for checking the integrity <strong>of</strong> the headeritself (not the data in the packet).• The source <strong>and</strong> destination addresses.The source <strong>and</strong> destination are given as IP addresses,which are 32 bits long <strong>and</strong> typically written as four sets <strong>of</strong>up to three numbers each—for example, 208.162.106.17A Network <strong>of</strong> NetworksAs the name implies, the Internet is a network that connectsmany local networks. The IP address includes an IDfor each network (called a subnet) <strong>and</strong> each host computeron the network. The arrangement <strong>and</strong> meaning <strong>of</strong> thesefields differs somewhat among five classes <strong>of</strong> IP addresses.The first three classes are designed for different sizes <strong>of</strong>networks, <strong>and</strong> the latter two are used for special purposessuch as “multicasting” where the same data packet is sentto multiple hosts.Many Internet users (at home as well as in <strong>of</strong>fices) arepart <strong>of</strong> a local network (see local area network). Typically,all users on the local network share a single Internetconnection, such as a DSL or cable line. This sharing

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!