Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
teknopedia

teknopedia

teknopedia

teknopedia

teknopedia

teknopedia
teknopedia
teknopedia
teknopedia
teknopedia
teknopedia
  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
  1. Weltenzyklopädie
  2. Tcl - Teknopedia
Tcl - Teknopedia
Disambiguazione – Se stai cercando altri significati, vedi TCL.
Tcl
linguaggio di programmazione
AutoreJohn Ousterhout
Data di origine1988
Ultima versione9.0.3 (13 novembre 2025)
Paradigmiprogrammazione multi-paradigma, programmazione orientata agli oggetti, programmazione procedurale, programmazione imperativa, programmazione funzionale e programmazione a eventi
Tipizzazionedebole
Estensioni comunitcl e tbc
Influenzato daAwk e Lisp
Ha influenzatoPHP, PowerShell, Tea
Implementazione di riferimento
Licenzalicenza BSD
Sito webtcl.tk
Modifica dati su Wikidata · Manuale

Tcl (acronimo di Tool Command Language[1], pronuncia tickleⓘ[2]) è un linguaggio di programmazione creato da John Ousterhout. È un linguaggio di scripting multipiattaforma, considerato di facile apprendimento e utilizzato nel rapid application development.[3][4]

Caratteristiche

[modifica | modifica wikitesto]

Le caratteristiche del linguaggio TCL comprendono:

  • Qualsiasi cosa è un comando, comprese le strutture del linguaggio. Queste ultime utilizzano la notazione polacca detta anche notazione prefissa.
  • Qualsiasi cosa può essere ridefinita o sovrascritta dinamicamente.
  • Tutti i tipi di dato possono essere manipolati come stringhe, compreso il codice.
  • Utilizza regole sintattiche estremamente semplici.
  • Possiede un'interfaccia a eventi per i socket e i file.
  • Facilmente estendibile tramite un'API che permette di collegare all'interprete oggetti scritti in C, C++, REXX e Java.
  • Completo supporto per l'Unicode già dal 1999.
  • Indipendente dalla piattaforma. L'interprete è già stato portato su Win32, Unix, Mac, e altri.
  • Buona integrazione con il sistema a finestre grazie all'estensione Tk.

Esempi

[modifica | modifica wikitesto]

Per un Hello world il codice è

puts "Hello World!"

Semplicissimo esempio di codice:

 puts "dammi un numero"
 gets stdin numero
 puts "Il quadrato è [expr {$numero * $numero}]"

Un altro esempio in stile funzionale:

 proc filter {list script} {
   set res {}
   foreach e $list {
     if {[uplevel 1 $script $e]} {
       lappend res $e
     }
   }
   set res
 }

L'elemento e è incluso nella lista list? Se sì ritorna 1, altrimenti 0.

 
 proc in {list e} {
   expr {[lsearch -exact $list $e] >= 0}
 }

Elementi comuni di due liste, ossia insieme intersezione:

 % filter {a b c} {in {b c d}}
 b c

Tk

[modifica | modifica wikitesto]

L'estensione Tk è un insieme di strumenti per scrivere GUI (un toolkit di widget) implementato dallo stesso autore di Tcl. Può essere usato anche in combinazione ad altri linguaggi come Perl, Python, Ruby, Lisp e altri, ed è stato portato su varie piattaforme quali GNU/Linux, Apple Macintosh, Unix e Windows.

Esempio Tk, un orologio numerico in tre righe:

 package require Tk
 proc every {ms body} {eval $body; after $ms [info level 0]}
 pack [label .clock -textvar time]
 every 1000 {set ::time [clock format [clock sec] -format %H:%M:%S]}

Note

[modifica | modifica wikitesto]
  1. ^ (EN) Welcome to the Tcl Developer Xchange!, su Tcl Developer Xchange.
  2. ^ (EN) Tcl vs. TCL, su Tcler's Wiki.
  3. ^ (EN) Features and Benefits, su Tcl Developer Xchange.
  4. ^ (EN) What is Tcl, su sito=Tcler's Wiki.

Bibliografia

[modifica | modifica wikitesto]
  • (EN) John K. Ousterhout e Ken Jones, Tcl and the Tk Toolkit, 2ª ed., Addison-Wesley, 2010, ISBN 978-0-321-33633-0.
  • (EN) Ashok P. Nadkarni, The Tcl Programming Language: A Comprehensive Guide, 2017, ISBN 978-1548679644.

Voci correlate

[modifica | modifica wikitesto]
  • Eggdrop
  • Expect
  • Tkinter
  • Freewrap

Altri progetti

[modifica | modifica wikitesto]

Altri progetti

  • Wikimedia Commons
  • Collabora a Wikimedia Commons Wikimedia Commons contiene immagini o altri file su Tcl

Collegamenti esterni

[modifica | modifica wikitesto]
  • (EN) Sito ufficiale, su tcl.tk. Modifica su Wikidata
  • (EN) Tcl, su SourceForge. Modifica su Wikidata
  • Tcl, su packages.debian.org. Modifica su Wikidata
  • Repository sorgenti di Tcl, su core.tcl-lang.org. Modifica su Wikidata
V · D · M
Principali linguaggi di programmazione (tutti)
ABAP · Ada · ALGOL · APL · Assembly · Awk · BASIC · C · C++ · C# · COBOL · Delphi · Eiffel · Fortran · F# · Haskell · IDL · Java · JavaScript · J# · Lisp · LOGO · Lua · ML · Objective-C · OCaml · Pascal · Perl · PHP · PL/I · PLaSM · Prolog · Python · Ruby · Rust · SAS · Scheme · sh · Simula · Smalltalk · SQL · Swift · Visual Basic
V · D · M
Software libero e open source
GeneraleCopyleft · Eventi · Software libero · Definizione · Gratis versus libre · Open source
Famiglie di sistemi operativiAros Research Operating System · BSD · Darwin · eCos · FreeDOS · GNU · Haiku · Inferno · Linux · Mach · Minix · OpenSolaris · Plan 9 · ReactOS · Redox · Symbian OS
Sviluppo software open sourceEclipse · Free Pascal · GCC · Gambas · Java · LLVM · Lua · NetBeans · Octave · Open64 · Perl · PHP · Python · ROSE · Ruby · Tcl
Storia del software liberoGNU · Haiku · Linux · Mozilla (Application Suite · Firefox · Thunderbird)
OrganizzazioniApache Software Foundation · Blender Foundation · Eclipse Foundation · freedesktop.org · Free Software Foundation (Europe · India · Latin America) · FSMI · GNOME Foundation · Google Code · KDE · Linux Foundation · Mozilla Foundation · Open Source Geospatial Foundation · Open Source Initiative · Software Freedom Conservancy · SourceForge · Symbian Foundation · The Document Foundation · Ubuntu Foundation · Xiph.Org Foundation · XMPP Standards Foundation · X.Org Foundation · Software Freedom Law Center
Licenze libereApache · Artistica · BSD · GNU GPL · GNU LGPL · ISC · MIT · MPL · Ms-PL/RL · zlib · Licenze approvate da FSF
Standard di licenzeOpen Source Definition · The Free Software Definition · Debian Free Software Guidelines
SfideBlob binario · Canonical's contributor agreement · Digital rights management · Rebranding dei programmi Mozilla · Software proprietario · Causa SCO-IBM · Restrizioni hardware · Trusted computing · Licenza virale · Guerra dei browser · Halloween Documents
Altri argomentiTermini alternativi · Comunità software libero · Distribuzione Linux · Forking · Movimento software libero · Microsoft Open Specification Promise · Revolution OS
Controllo di autoritàLCCN (EN) sh94000154 · GND (DE) 4361529-6 · J9U (EN, HE) 987007558786705171
  Portale Informatica: accedi alle voci di Teknopedia che trattano di informatica
Estratto da "https://it.wikipedia.org/w/index.php?title=Tcl&oldid=144658429"

  • Indonesia
  • English
  • Français
  • 日本語
  • Deutsch
  • Italiano
  • Español
  • Русский
  • فارسی
  • Polski
  • 中文
  • Nederlands
  • Português
  • العربية
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022