tcsh版本问题(字符串转化为数值)
2010-11-08 17:00
501 查看
同样程序代码:
set a = '010'
@ b = $a
echo $a
echo $b
正常机器运行结果:
010
10
异常机器结果:
010
8
正常运行机器的tcsh版本:
tcsh 6.13.00 (Astron) 2004-05-19 (i386-intel-linux) options 8b,nls,dl,al,kan,rh,color,dspm,filec
异常运行机器tcsh版本:
tcsh --version:
tcsh 6.14.00 (Astron) 2005-03-25 (i386-intel-linux) options wide,nls,dl,al,kan,sm,rh,color,filec
yum info tcsh:
Installed Packages
Name : tcsh
Arch : i386
Version : 6.14
Release : 14.el5
Size : 1.1 M
Repo : installed
Summary : C シェル csh の強化版
URL : http://www.tcsh.org/
License : distributable
Description: Tcsh is an enhanced but completely compatible version of csh, the C
: shell. Tcsh is a command language interpreter which can be used
: both as an interactive login shell and as a shell script command
: processor. Tcsh includes a command line editor, programmable word
: completion, spelling correction, a history mechanism, job control
: and a C language like syntax.
-------------------------------
估计是options wide与options 8b的问题
tcsh 6.14支持了8进制?(上面程序中tcsh 6.14把$a当成了8进制数值转换)
看来在不改变代码的前提下只能换个版本了。
(待考)
set a = '010'
@ b = $a
echo $a
echo $b
正常机器运行结果:
010
10
异常机器结果:
010
8
正常运行机器的tcsh版本:
tcsh 6.13.00 (Astron) 2004-05-19 (i386-intel-linux) options 8b,nls,dl,al,kan,rh,color,dspm,filec
异常运行机器tcsh版本:
tcsh --version:
tcsh 6.14.00 (Astron) 2005-03-25 (i386-intel-linux) options wide,nls,dl,al,kan,sm,rh,color,filec
yum info tcsh:
Installed Packages
Name : tcsh
Arch : i386
Version : 6.14
Release : 14.el5
Size : 1.1 M
Repo : installed
Summary : C シェル csh の強化版
URL : http://www.tcsh.org/
License : distributable
Description: Tcsh is an enhanced but completely compatible version of csh, the C
: shell. Tcsh is a command language interpreter which can be used
: both as an interactive login shell and as a shell script command
: processor. Tcsh includes a command line editor, programmable word
: completion, spelling correction, a history mechanism, job control
: and a C language like syntax.
-------------------------------
估计是options wide与options 8b的问题
tcsh 6.14支持了8进制?(上面程序中tcsh 6.14把$a当成了8进制数值转换)
看来在不改变代码的前提下只能换个版本了。
(待考)
相关文章推荐
- 关于C#中货币类型和数值类型、字符串类型的转化和在DataGridView中的显示问题:
- Java数值转化为二进制、十进制、十六进制字符串
- C#数值字符串转化为数值
- 关于SQL Server中将数值类型转换为字符串的问题(转)
- 判断字符串是否可以转化为数值类型
- MySQL的数值转化问题
- 转换函数:TO_CHAR()用法之一 将一个数值转化成字符串
- 字符串与数值类型的转化
- 在VS2005/2008中字符串编码问题的解决及字符串和数值类型常用的转换方法
- 将一个十六进制字符串转换为十进制数值的问题
- 关于字符串数据转化为float类型的问题
- C++ 字符串转化数值
- js把科学计数法表示的字符串转化为数值的方法
- 关于SQL Server中将数值类型转换为字符串的问题(转)
- 大的字符串的中数据转化为数字,字符数值的提取转化,atoi();
- Java中关于Json对象类型和字符串类型之间互相转化的问题 .
- 将流信息转化成字符串并解决乱码的问题
- 关于Gson无法将匿名类转化为json字符串的问题
- C#中货币类型和数值类型、字符串类型的转化
- 字符串数值转换问题总结