谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
8 j8 G. n1 j/ L( hbegin model initialization function8 {0 ^; M9 K& |, M, ~. W
create 1 load of load type L_null to P_Creation21 @. T" x) }0 S1 N- X: z
create 1 load of load type L_null to P_Creation3/ G1 w- I2 G# U' P+ K1 u. }( `1 t
create 1 load of load type L_null to P_Creation4- r1 z( m9 u' R% f; z4 H$ [
return true ( j" b n! |$ c. j- _) l9 R
end
S6 D. h7 K1 G( j8 D u# l
, g' x, b7 O7 A$ t/ J; gbegin P_Creation2 arriving procedure
$ w7 C U P7 Vwhile 1=1 do
; l8 b+ |6 L# g: ] begin
$ o$ b$ X+ Y/ D- y6 e. B3 H3 { wait for 1 sec
% z6 Y4 x R2 S8 n3 X create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)0 ^0 S: E) t/ e6 A+ c% E, U" Q
end
1 k( s. o5 l6 i6 c' lend& K9 o2 J. h4 G$ ?* H6 x5 v
# C# v S; x2 R3 ]; m) h% k% T( a4 u& Nbegin P_Creation3 arriving procedure) K6 Q3 T2 Z- S0 n
while 1=1 do
! r+ x1 x# L i/ h; O# W7 ? begin
4 P; C8 L) i7 Z9 F9 W5 O wait for 1 sec- H! S R7 V9 w2 }# | N* N2 a
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
* O1 @0 w; i) M. {' X0 U6 V; ` end/ J6 L- p1 N8 k/ {9 g" @$ Q! L
end
! j. j8 i! ?/ z8 m. y7 k5 A% D: V- ]" }7 J# P- o
begin P_Creation4 arriving procedure1 U" D% D; r2 }2 ^
while 1=1 do5 x m" L+ k% U6 E. {/ n8 Q
begin! K1 h" ^8 g1 b X) X% B" i# t$ j
wait for 1 sec
3 `! g% S3 N8 A create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
, p7 o; }3 N. @& z end" h! x1 |! {2 _' f8 p! |- Q) ^/ L3 b
end
/ V0 m8 Z2 t6 u% J6 _: }4 m o, J6 q5 G0 T
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |