admin管理员组文章数量:1794759
linux如何运行tcl文件,如何在Linux系统中编写、编译和运行Tcl程
tcl Hello World Example: How To Write,
Compile and Execute Tcl Programon linux OS
系统中编写、、编译和运行Tcl程序
程序??
实例::如何在Linux系统中编写
Tcl Hello World 实例
原文出处:点击这里
by Ramesh Natarajan on April 9, 2010 ShareThis
由Ramesh Natarajan于2010年4月9日分享
Question: I would like to understand the basics of how to write and execute
Tcl program on UNIX / Linux OS. Can you explain it with a simple example?
问题:我想理解如何在UNIX/Linux系统中编写和运行Tcl程序的基本知识,您能用一个简单的例子解释下吗?
Answer: In this article, let us review very quickly how to write a basic Hello
World Tcl program and execute tcl program on Linux or Unix OS.
回答:在本文中,让我们快速地复习如何在Linux或Unix操作系统中编写一个基础的Hello World Tcl程序并运行tcl程序。
1. Write a Hello World Tcl Program
1.编写一个Hello World Tcl 程序
Create the helloworld program using the Vim editor as shown below.
使用如下所示的Vim编辑器新建一个helloworld程序:
$ vim helloworld.tcl
#!/usr/bin/tclsh
# hello world sample program
puts "Hello, World !"
Note: Comment in Tcl starts with #.
提示:Tcl程序中以“#”开头的为注释。
2. Make sure Tcl interpreter is installed on your system
2.确保您的系统安装了Tcl解释器
Make sure Tcl interpreter is installed on your system as shown below.
使用如下命令来确保您的系统安装Tcl解释器:
$ whereis tclsh
tclsh: /usr/bin/tclsh /usr/bin/tclsh8.4 /usr/share/man/man1/tclsh.1.gz
Installing tcl interpreter
版权声明:本文标题:linux如何运行tcl文件,如何在Linux系统中编写、编译和运行Tcl程 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686942324a120886.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论