CSHELL数组求教
时间:10-02
整理:3721RD
点击:
请教高手cshell如何定义数组呀,欢迎交流脚本方面的知识!QQ:439005790
很容易的,eg:
unset targetxx
unset targetyy
set target_x1 = `echo "scale=6;$gPROF_LIMITSxmin + $x_target1"|bc -l`
set target_y1 = `echo "scale=6;$gSR_LIMITSymax + 8.5 "|bc -l`
set target_x2 = `echo "scale=6;$gPROF_LIMITSxmin + $x_target1"|bc -l`
set target_y2 = `echo "scale=6;$gSR_LIMITSymin - 8.5 "|bc -l`
set target_x3 = `echo "scale=6;$gPROF_LIMITSxmax - $x_target2"|bc -l`
set target_y3 = `echo "scale=6;$gSR_LIMITSymax + 8.5 "|bc -l`
set targetxx = ($target_x1 $target_x2 $target_x3)
set targetyy = ($target_y1 $target_y2 $target_y3)
targetxx和targetyy就是两个数组.
多谢了,还想请教下是否可用下标访问呀,请多指教了!我今天就这样写出了自动加编号孔的脚本,不过没用下标表示,是用的foreach循环!是用几个8表示的那种编号当然包含版本号!