谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
7 f* Y* |4 ~4 G) H5 Bbegin model initialization function" x% }: C# M. K) k" |& f6 M: ?7 Q. m& l
create 1 load of load type L_null to P_Creation2" T, P0 C5 A$ [+ @1 ~# k: g
create 1 load of load type L_null to P_Creation3
! o8 M8 W( y: m- k create 1 load of load type L_null to P_Creation4
# k! O% } }. z7 I/ b. | return true 5 X" V! l) |# B0 c
end3 N5 Z" c9 h' |, |3 x
& w( \' d: y! ~/ Lbegin P_Creation2 arriving procedure! s7 u% f, G2 X
while 1=1 do
$ `& k; S. D" @4 M0 t {; L, n8 [6 r3 v. C O begin
( }' U- ^2 z" K, {- O |& |7 O+ f wait for 1 sec
* F* p% e' K) o! {+ ^ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)* F/ y/ u' X4 y5 H7 Y" N: [
end+ H& Z( i A# t, h7 z& H' ^
end
3 V' r/ }* R, W J/ ?! k- L
Y V! f% V9 l n$ y: ?begin P_Creation3 arriving procedure- I Y b9 W+ V' b2 l( e8 W3 ]2 P
while 1=1 do
: a" Q. {- F- B5 F9 j) X begin
' E% T; Y4 y. z' I0 V4 [0 g wait for 1 sec
( Q7 r/ c5 B* k6 O create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)8 x+ i: P8 F$ ^* q0 P+ @" f7 D+ O
end7 F1 ~3 |% V' s1 B- _1 ?! l, R
end
9 r7 Y. Y" ^, D
! b* Y6 B- i/ I% hbegin P_Creation4 arriving procedure
2 g! H" k5 ]1 R. c) Swhile 1=1 do2 `! Z: N! g+ b. T( `
begin. x3 X' ]/ A) a- j# c: {
wait for 1 sec& I7 X) D$ D w: v5 o
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)( @ @; x9 W' S+ B' H
end
. T$ A3 W, a7 b6 z4 P3 q0 F% lend
0 T, ^. ]: c( m: L: V# O: y* d, |6 A
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |