|
|
使用Plant Simultation 9运行周老师的生产系统仿真教程第一章的P5的程序时,总是报错(勘误之后的),显示。3 z- t5 ^' M& w9 [8 }7 x+ K
is, g2 e* S& v7 W5 m- N$ a
m,n:integer; --zhengshu bianliang
2 v5 ~; Z2 e: x- m9 H& h, @7 i Name:string; --zifuchuan bianliang6 ~' J2 a! }+ g
obj:Object; --dui xiang lei xing bianliang
; d5 d% x; Q% i/ g4 Q' Ado0 ? J5 B: j i% B1 N. T8 Q
m:=str_to_num(omit(?.Name,1,5)); / a K) r- D, t9 B6 t: _$ Q$ C9 y
Name:=sprint("Output_Line",m); --sheng chan xian mingcheng
& [/ R; L+ X0 L2 ?. f4 z' g! Q Obj:=str_to_obj(Name);
; p3 t+ `5 }; a. T* U4 j: K n:=?.StatNumIn;
R4 u* w+ T" R% Y Obj.val:=n;# L1 J/ Y1 Q. k) F) C
if m>1 then/ q$ Y# H y3 I( v- L! x
Name:=sprint("OutRate_Line",m);
0 m( W+ ?' z8 a8 |7 K P3 ^7 h Obj:=str_to_obj(Name);. E4 Y1 _' H' s8 X" r- M' E2 O
Obj.val:=n*100/Output_Line1;
- u2 z- T9 t( Q( ? end;6 E; I" K* I3 U+ |# P: b
end;; g; W) R5 b& y4 H/ \5 {
行 6 中的方法 '.DOE_sim.SingleLine.CalOutPut' 出错:'VOID' 无法接受方法 'Name'。是怎么回事啊? |
|