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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值