Cadence Skill 论坛




查看: 1400|回复: 1


发表于 2016-11-25 15:55:10 | 显示全部楼层 |阅读模式
-> 和  ~>有什么区别?
发表于 2017-6-7 21:48:56 | 显示全部楼层
sklanguser.pdf 里面的解释

Arrow (->) Operator
The arrow (->) operator can be applied to disembodied property lists, defstructs, association
tables, and user types (special application-supplied types) to access property values. The
property must always be a symbol and the value of the property can be any valid Cadence®
SKILL language type.
Squiggle Arrow (~>) Operator
The squiggle arrow (~>) operator is a generalization of the arrow operator. It works the same
way as an arrow operator when applied directly to an object, but it can also accept a list of
such objects. It walks the list applying the arrow operator whenever it finds an atomic object.
The underlying functions for ~> operator are the setSGq and getSGq functions, which set
and retrieve the value of an attribute or a property. For example,
setSGq(obj value prop) ; is equivalent to:
a=getSGq(obj prop) ; is equivalent to:
info=getSGq(cvId objType) ; is equivalent to:
setSGq(rect list(10:10 100:120) bBox) ; is equivalent to:
rect~>bBox=list(10:10 100:120)
您需要登录后才可以回帖 登录 | 立即注册


Archiver|手机版|网站地图|Cadence Skill 论坛 ( 蜀ICP备13024417号

GMT+8, 2019-7-20 17:49 , Processed in 0.243872 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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