iCAx开思网

标题: 关系式里取余的函数是什么 [打印本页]

作者: poniard    时间: 2004-2-20 13:50
标题: 关系式里取余的函数是什么
正如c程序里的"%"具有取余功能。例如10%3=1。。
proe里是什么呢?
那里可以查到proe编辑关系式的格式。。他与c程序略有不同。。比如
c里面是end if  
proe里是endif
作者: rzw    时间: 2004-2-20 16:14
期待着!
作者: poniard    时间: 2004-2-21 11:02
顶上来。。高手们指点一下。。如果没有该函数。。
有没有曲线救国的办法?
作者: lap    时间: 2004-2-21 16:09
我不大懂如何在PROE裡編寫程序,
但希望可幫到你.
  
a = 13
b = 3
c = a / b
d = a - ( b * floor (c))
-------------------------------
c = 4.3333
floor (c) = 4
d = 1 (餘數)
-------------------------------
作者: poniard    时间: 2004-2-21 17:06
if memb_i=1+3*floor(memb_i/3)
  /* ERROR: Logical expression expected.
  memb_i=10
if memb_i=2+3*floor(memb_i/3)
  /* ERROR: Logical expression expected.
  memb_i=20
if memb_i=3*floor(memb_i/3)
  /* ERROR: Logical expression expected.
  memb_i=30
endif
  /* ERROR: Relation has an error.  
  
郁闷。。谢谢lap。好像不大行诶
作者: Steven.Yan    时间: 2004-2-21 20:11
頂﹐我也不會﹐
作者: UgHwang    时间: 2004-2-22 01:40
proe的關係式一直是個頭痛的問題!望PROE高手解答!
作者: poniard    时间: 2004-2-22 10:11
第一次
if 1==idx1-3*floor(idx1/3,0)
  memb_i=10  
if 2==idx1-3*floor(idx1/3,0)
  memb_i=20  
if 0==idx1-3*floor(idx1/3,0)
  memb_i=30  
else
endif  
  /* ERROR: Relation has an error.  
第二次
n=idx1-3*floor(idx1/3,0)
  memb_i=10*n
作者: poniard    时间: 2004-2-22 10:28
第二次关系式对了,但阵列并不如我所想。。没有按照循环方式增加。。 而是直线式增加
作者: poniard    时间: 2004-2-27 14:58
n=idx1-3*floor(idx1/3,0)  
memb_v=lead_v+n*5
搞定喽。嘿嘿
作者: wogozo13    时间: 2005-12-13 10:50
怎么没人解释一下PROE现成函数的定义啊?
作者: 袖珍天使    时间: 2005-12-13 10:55
PROE没有直接取余的函数.可用floor函数间接实现




欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3