PCB论坛网

 找回密码
 注册
查看: 1015|回复: 2

CSHELL数组求教

[复制链接]
发表于 2008-9-7 21:06:00 | 显示全部楼层 |阅读模式
请教高手cshell如何定义数组呀,欢迎交流脚本方面的知识!QQ:439005790
回复

使用道具 举报

发表于 2008-9-7 21:21:00 | 显示全部楼层

很容易的,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就是两个数组.

回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-9-8 21:01:00 | 显示全部楼层
多谢了,还想请教下是否可用下标访问呀,请多指教了!我今天就这样写出了自动加编号孔的脚本,不过没用下标表示,是用的foreach循环!是用几个8表示的那种编号当然包含版本号!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|手机版|PCB设计论坛|EDA论坛|PCB论坛网 ( 沪ICP备05006956号-1 )

GMT+8, 2024-9-27 23:23 , Processed in 0.120447 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表