?? ex14.tcl
字號:
# Copyright 1996
# Authors
# Lakshmi Sastry
# Computing and Information Systems Department
# Rutherford Appleton Laboratory, Chilton, Didcot. OX11 0QX
# lakshmi.sastry@rl.ac.uk
# and
# Venkat VSS Sastry
# Department of Applied Mathematics and Operational Research
# Cranfield University, RMCS Shrivenham, Swindon, SN6 8LA
# sastry@rmcs.cran.ac.uk
# Permission to use, copy, modify, and distribute this
# software and its documentation for any purpose and without
# fee is hereby granted, provided that this copyright
# notice appears in all copies.
# The authors, RAL, RMCS Shrivenham, Cranfield University and AGOCG
# make no representations about the suitability of this
# software for any purpose. It is provided "as is" without
# express or implied warranty. Likewise they accept no responsibility
# whatsoever for any public domain software modules used (which are
# hereby acknowledged) in this software
# set_ex2.tcl - arithmetic, command substitution
#
set x 5
set y 6
set ans $x+$y ;# ans will contain the string 5+6
puts $tout "ans is the string $ans \n"
#
# to perform addition, you must explicitly use expr
#
expr $x + $y ;# tcl handles string to numeric conversion
#
# assign the value to ans
# Here, ans is assigned the out put of another command enclosed
# within square brackets
set ans [expr $x + $y]
puts $tout "Now ans is $ans, the result of the arithmatic operation\n"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -