⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex10.tcl

📁 很不错的tcl编程实例
💻 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 

# regexp_ex2.tcl - pattern for picking reals
#
#    [+-]?     + or - may or may not be present
#    [0-9]+    one or more digits in the range 0 to 9
#    \.        a decimal point (you need to escape .)
#    [0-9]+    one or more digits in the range 0 to 9
#    ([eE])?   optional characters e or E
#    ([+-])?   optional characters +,- in the exponent
#    [0-9]+    one or more digits in the range 0 to 9
#    
set pat {[+-]?[0-9]+\.[0-9]+([eE])?([+-])?[0-9]+}  
regexp $pat  1.2e-01 a 
puts $tout "$a\n"
regexp $pat -3.12E2 a
puts $tout "$a\n"
regexp $pat 0.001 a
puts $tout "$a\n"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -